forked from jshiffer/go-xmpp
do not crash on failed connect
This commit is contained in:
parent
15ac96c029
commit
a60980a550
4
xmpp.go
4
xmpp.go
@ -224,7 +224,11 @@ func NewClientNoTLS(host, user, passwd string, debug bool) (*Client, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) Close() error {
|
func (c *Client) Close() error {
|
||||||
|
if c.conn != (*tls.Conn)(nil) {
|
||||||
return c.conn.Close()
|
return c.conn.Close()
|
||||||
|
} else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func saslDigestResponse(username, realm, passwd, nonce, cnonceStr,
|
func saslDigestResponse(username, realm, passwd, nonce, cnonceStr,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user