diff -r 3f891f7fe817 -r 6b527647086c xmpp/xmpp.go --- a/xmpp/xmpp.go Mon Sep 30 20:31:25 2013 -0600 +++ b/xmpp/xmpp.go Mon Sep 30 20:33:50 2013 -0600 @@ -294,8 +294,9 @@ // there's already an error in the channel, discard the newer one in // favor of the older. func (cl *Client) setError(err error) { - cl.Close() - cl.setStatus(StatusError) + defer cl.Close() + defer cl.setStatus(StatusError) + if len(cl.error) > 0 { return }