mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-21 10:02:00 -08:00
init empty TLSConfig, if nothing given
This commit is contained in:
parent
d36428fb2f
commit
e05f36c69f
@ -117,6 +117,10 @@ func (s *Session) startTlsIfSupported(conn net.Conn, domain string, o Config) ne
|
|||||||
return conn
|
return conn
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if o.TLSConfig == nil {
|
||||||
|
o.TLSConfig = &tls.Config{}
|
||||||
|
}
|
||||||
|
|
||||||
if o.TLSConfig.ServerName == "" {
|
if o.TLSConfig.ServerName == "" {
|
||||||
o.TLSConfig.ServerName = domain
|
o.TLSConfig.ServerName = domain
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user