forked from jshiffer/go-xmpp
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
|
||||
}
|
||||
|
||||
if o.TLSConfig == nil {
|
||||
o.TLSConfig = &tls.Config{}
|
||||
}
|
||||
|
||||
if o.TLSConfig.ServerName == "" {
|
||||
o.TLSConfig.ServerName = domain
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user