mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-02-28 15:52:54 -08:00
@@ -117,8 +117,10 @@ func (s *Session) startTlsIfSupported(conn net.Conn, domain string, o Config) ne
|
||||
return conn
|
||||
}
|
||||
|
||||
o.TLSConfig.ServerName = domain
|
||||
tlsConn := tls.Client(conn, &o.TLSConfig)
|
||||
if o.TLSConfig.ServerName == "" {
|
||||
o.TLSConfig.ServerName = domain
|
||||
}
|
||||
tlsConn := tls.Client(conn, o.TLSConfig)
|
||||
// We convert existing connection to TLS
|
||||
if s.err = tlsConn.Handshake(); s.err != nil {
|
||||
return tlsConn
|
||||
|
||||
Reference in New Issue
Block a user