init empty TLSConfig, if nothing given

disco_info_form
Martin/Geno 5 years ago committed by Mickaël Rémond
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…
Cancel
Save