diff -r 74686b8c9146 -r e6cb3f049137 stream.go --- a/stream.go Thu Jan 05 19:53:37 2012 -0700 +++ b/stream.go Thu Jan 05 23:14:14 2012 -0700 @@ -309,6 +309,7 @@ continue } filterIn <- topFilter + topFilter = newFilterOut case data, ok := <-topFilter: if !ok { @@ -593,7 +594,7 @@ if res != "" { bindReq.Resource = &res } - msg := &Iq{Type: "set", Id: <- cl.Id, Nested: &bindReq} + msg := &Iq{Type: "set", Id: <- Id, Nested: &bindReq} f := func(st Stanza) bool { if st.GetType() == "error" { log.Println("Resource binding failed")