forked from jshiffer/go-xmpp
Returned client will be nil if parameter are incorrect
This commit is contained in:
parent
b8fdc510a6
commit
d45dd6a44a
@ -86,14 +86,14 @@ func NewClient(config Config) (c *Client, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
c = new(Client)
|
||||
c.config = config
|
||||
|
||||
// Parse JID
|
||||
if c.config.parsedJid, err = NewJid(c.config.Jid); err != nil {
|
||||
if config.parsedJid, err = NewJid(c.config.Jid); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
c = new(Client)
|
||||
c.config = config
|
||||
|
||||
if c.config.ConnectTimeout == 0 {
|
||||
c.config.ConnectTimeout = 15 // 15 second as default
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user