Correct the statemachine's ensure_any method.

It had not been updated to use the new condition instead of the old
threading event.
This commit is contained in:
Lance Stout
2012-04-06 17:39:51 -04:00
parent 83c5a4cd2f
commit aedbecd673
2 changed files with 5 additions and 13 deletions

View File

@@ -1234,9 +1234,8 @@ class XMLStream(object):
# be resent and processing will resume.
while not self.stop.is_set():
# Only process the stream while connected to the server
if not self.state.ensure('connected', wait=0.1,
block_on_transition=True):
continue
if not self.state.ensure('connected', wait=0.1):
break
# Ensure the stream header is sent for any
# new connections.
if not self.session_started_event.is_set():