From 53bcd33e1d9d829b01aeaa8463fb7cabf01b91ee Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Wed, 22 Feb 2012 07:57:13 -0800 Subject: [PATCH] Let disconnect() wait for its lock for a few seconds. This should eliminate most debug statements about not being able to acquire a lock during disconnect. --- sleekxmpp/xmlstream/xmlstream.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 4c4b1eb..0321737 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -576,6 +576,7 @@ class XMLStream(object): :attr:`disconnect_wait`. """ self.state.transition('connected', 'disconnected', + wait=2.0, func=self._disconnect, args=(reconnect, wait)) def _disconnect(self, reconnect=False, wait=None):