forked from jshiffer/go-xmpp
Fix missing default channel creation
This commit is contained in:
parent
83ae778d33
commit
909cf753c9
@ -109,7 +109,7 @@ func NewClient(config Config) (c *Client, err error) {
|
|||||||
c.config.ConnectTimeout = 15 // 15 second as default
|
c.config.ConnectTimeout = 15 // 15 second as default
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a default channel that developer can override
|
// Create a default channel that developers can override
|
||||||
c.RecvChannel = make(chan interface{})
|
c.RecvChannel = make(chan interface{})
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -58,7 +58,10 @@ type Component struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewComponent(opts ComponentOptions) (*Component, error) {
|
func NewComponent(opts ComponentOptions) (*Component, error) {
|
||||||
return &Component{ComponentOptions: opts}, nil
|
c := Component{ComponentOptions: opts}
|
||||||
|
// Create a default channel that developers can override
|
||||||
|
c.RecvChannel = make(chan interface{})
|
||||||
|
return &c, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connect triggers component connection to XMPP server component port.
|
// Connect triggers component connection to XMPP server component port.
|
||||||
|
Loading…
Reference in New Issue
Block a user