forked from jshiffer/go-xmpp
don't modify DefaultConfig
This commit is contained in:
4
xmpp.go
4
xmpp.go
@@ -191,7 +191,9 @@ func (o Options) NewClient() (*Client, error) {
|
|||||||
tlsconn = tls.Client(c, o.TLSConfig)
|
tlsconn = tls.Client(c, o.TLSConfig)
|
||||||
} else {
|
} else {
|
||||||
DefaultConfig.ServerName = host
|
DefaultConfig.ServerName = host
|
||||||
tlsconn = tls.Client(c, &DefaultConfig)
|
newconfig := DefaultConfig
|
||||||
|
newconfig.ServerName = host
|
||||||
|
tlsconn = tls.Client(c, &newconfig)
|
||||||
}
|
}
|
||||||
if err = tlsconn.Handshake(); err != nil {
|
if err = tlsconn.Handshake(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in New Issue
Block a user