Don't forget to remove the stanza handler after it's been used.
authorChris Jones <chris@cjones.org>
Wed, 28 Dec 2011 11:35:21 -0700
changeset 14 fd6781a41e6f
parent 13 c9527bbe99a6
child 15 aa2cf77f0ed3
Don't forget to remove the stanza handler after it's been used.
stream.go
--- a/stream.go	Wed Dec 28 11:30:10 2011 -0700
+++ b/stream.go	Wed Dec 28 11:35:21 2011 -0700
@@ -200,6 +200,7 @@
 			if st, ok := x.(Stanza) ; ok &&
 				handlers[st.XId()] != nil {
 				f := handlers[st.XId()]
+				handlers[st.XId()] = nil
 				send = f(st)
 			}
 			if send {
@@ -475,7 +476,6 @@
 				"resource"}, Chardata: res}
 	}
 	cl.xmlOut <- msg
-	// TODO Grab the iq result from the server and update cl.Jid.
 }
 
 func (cl *Client) HandleStanza(id string, f func(Stanza) bool) {