summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/xmlstream.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-02-22 07:57:13 -0800
committerLance Stout <lancestout@gmail.com>2012-02-22 07:57:13 -0800
commit53bcd33e1d9d829b01aeaa8463fb7cabf01b91ee (patch)
treee57e9f793aa79bb0bd5721b8a926ca1e4d14f006 /sleekxmpp/xmlstream/xmlstream.py
parente3d596c9fa1a8c138df0ebd97e90c6d510b77929 (diff)
downloadslixmpp-53bcd33e1d9d829b01aeaa8463fb7cabf01b91ee.tar.gz
slixmpp-53bcd33e1d9d829b01aeaa8463fb7cabf01b91ee.tar.bz2
slixmpp-53bcd33e1d9d829b01aeaa8463fb7cabf01b91ee.tar.xz
slixmpp-53bcd33e1d9d829b01aeaa8463fb7cabf01b91ee.zip
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.
Diffstat (limited to 'sleekxmpp/xmlstream/xmlstream.py')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 4c4b1ebb..03217378 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):