author | Chris Jones <chris@cjones.org> |
Mon, 30 Sep 2013 20:33:50 -0600 | |
changeset 164 | 6b527647086c |
parent 163 | 3f891f7fe817 |
child 165 | d3182a279bf4 |
xmpp/xmpp.go | file | annotate | diff | comparison | revisions |
--- 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 }