mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-23 02:52:00 -08:00
Replace readWriter and decoder after StartTLS
This commit is contained in:
parent
60e2cdd088
commit
390f9b065e
@ -78,6 +78,11 @@ func (t *XMPPTransport) StartTLS() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.conn = tlsConn
|
||||||
|
t.readWriter = newStreamLogger(tlsConn, t.logFile)
|
||||||
|
t.decoder = xml.NewDecoder(t.readWriter)
|
||||||
|
t.decoder.CharsetReader = t.Config.CharsetReader
|
||||||
|
|
||||||
if !t.TLSConfig.InsecureSkipVerify {
|
if !t.TLSConfig.InsecureSkipVerify {
|
||||||
if err := tlsConn.VerifyHostname(t.Config.Domain); err != nil {
|
if err := tlsConn.VerifyHostname(t.Config.Domain); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user