diff -r a456133ed0ac -r a77fc342e013 stream.go --- a/stream.go Thu Dec 29 11:02:21 2011 -0700 +++ b/stream.go Thu Dec 29 11:11:18 2011 -0700 @@ -497,7 +497,7 @@ // Send a request to bind a resource. RFC 3920, section 7. func (cl *Client) bind(bind *Generic) { res := cl.Jid.Resource - msg := &Iq{Type: "set", Id: cl.NextId(), Any: + msg := &Iq{Type: "set", Id: <- cl.Id, Any: &Generic{XMLName: xml.Name{Space: nsBind, Local: "bind"}}} if res != "" {