forked from jshiffer/go-xmpp
Generate new ID for session (fixes #67)
Co-authored-by: https://github.com/ikq
This commit is contained in:
parent
07196efcf3
commit
eedd7259cb
1
xmpp.go
1
xmpp.go
@ -798,6 +798,7 @@ func (c *Client) init(o *Options) error {
|
||||
}
|
||||
if o.Session {
|
||||
// if server support session, open it
|
||||
cookie = getCookie() // generate new id value for session
|
||||
fmt.Fprintf(c.stanzaWriter, "<iq to='%s' type='set' id='%x'><session xmlns='%s'/></iq>\n", xmlEscape(domain), cookie, nsSession)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user