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.
This commit is contained in:
Lance Stout 2012-02-22 07:57:13 -08:00
parent e3d596c9fa
commit 53bcd33e1d

View file

@ -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):