diff --git a/xmpp.go b/xmpp.go index 0d30d9f..a01d2ac 100644 --- a/xmpp.go +++ b/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, "\n", xmlEscape(domain), cookie, nsSession) }