mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-23 20:33:46 -07:00
don't modify DefaultConfig
This commit is contained in:
@@ -191,7 +191,9 @@ func (o Options) NewClient() (*Client, error) {
|
||||
tlsconn = tls.Client(c, o.TLSConfig)
|
||||
} else {
|
||||
DefaultConfig.ServerName = host
|
||||
tlsconn = tls.Client(c, &DefaultConfig)
|
||||
newconfig := DefaultConfig
|
||||
newconfig.ServerName = host
|
||||
tlsconn = tls.Client(c, &newconfig)
|
||||
}
|
||||
if err = tlsconn.Handshake(); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user