mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-22 18:42:02 -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
|
||||
}
|
||||
|
||||
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 err := tlsConn.VerifyHostname(t.Config.Domain); err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user