mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-26 20:32: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