mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-23 12:23:46 -07:00
fix DefaultConfig.ServerName not set when func NewClient(host...) is used
This commit is contained in:
@@ -168,6 +168,7 @@ func (o Options) NewClient() (*Client, error) {
|
||||
if o.TLSConfig != nil {
|
||||
tlsconn = tls.Client(c, o.TLSConfig)
|
||||
} else {
|
||||
DefaultConfig.ServerName = strings.Split(o.User, "@")[1]
|
||||
tlsconn = tls.Client(c, &DefaultConfig)
|
||||
}
|
||||
if err = tlsconn.Handshake(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user