summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/handler
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-11-17 15:13:09 -0500
committerLance Stout <lancestout@gmail.com>2010-11-17 15:13:09 -0500
commit6ee8a2980c2a7c9a8c65453b1d2c551717069ce5 (patch)
tree2721ea1d493ecb9d1d8ab40098403b60b3f02f7f /sleekxmpp/xmlstream/handler
parentb8114b25ed28437248322aad50209f737faa392c (diff)
downloadslixmpp-6ee8a2980c2a7c9a8c65453b1d2c551717069ce5.tar.gz
slixmpp-6ee8a2980c2a7c9a8c65453b1d2c551717069ce5.tar.bz2
slixmpp-6ee8a2980c2a7c9a8c65453b1d2c551717069ce5.tar.xz
slixmpp-6ee8a2980c2a7c9a8c65453b1d2c551717069ce5.zip
Fix RESPONSE_TIMEOUT dependency loops.
Diffstat (limited to 'sleekxmpp/xmlstream/handler')
-rw-r--r--sleekxmpp/xmlstream/handler/waiter.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/handler/waiter.py b/sleekxmpp/xmlstream/handler/waiter.py
index a4bc3545..341c01fe 100644
--- a/sleekxmpp/xmlstream/handler/waiter.py
+++ b/sleekxmpp/xmlstream/handler/waiter.py
@@ -12,7 +12,7 @@ try:
except ImportError:
import Queue as queue
-from sleekxmpp.xmlstream import StanzaBase, RESPONSE_TIMEOUT
+from sleekxmpp.xmlstream import StanzaBase
from sleekxmpp.xmlstream.handler.base import BaseHandler
@@ -69,7 +69,7 @@ class Waiter(BaseHandler):
"""
pass
- def wait(self, timeout=RESPONSE_TIMEOUT):
+ def wait(self, timeout=None):
"""
Block an event handler while waiting for a stanza to arrive.
@@ -84,6 +84,9 @@ class Waiter(BaseHandler):
arrive. Defaults to the global default timeout
value sleekxmpp.xmlstream.RESPONSE_TIMEOUT.
"""
+ if timeout is None:
+ timeout = self.stream.response_timeout
+
try:
stanza = self._payload.get(True, timeout)
except queue.Empty: