diff options
author | Lance Stout <lancestout@gmail.com> | 2010-11-18 00:44:51 -0500 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2010-11-18 00:44:51 -0500 |
commit | 58b95e4ae45432ae97bd643c591f4f078f29f300 (patch) | |
tree | 0bf29e982c6f7a7d486d00f01188e021ab193aa1 /sleekxmpp/xmlstream/handler | |
parent | debf90935981622c7b23009b7edeb311fd57ee5c (diff) | |
parent | 60d3afe6b6814bb5d30c4d4d355451d3c15364ca (diff) | |
download | slixmpp-58b95e4ae45432ae97bd643c591f4f078f29f300.tar.gz slixmpp-58b95e4ae45432ae97bd643c591f4f078f29f300.tar.bz2 slixmpp-58b95e4ae45432ae97bd643c591f4f078f29f300.tar.xz slixmpp-58b95e4ae45432ae97bd643c591f4f078f29f300.zip |
Merge branch 'develop' of github.com:fritzy/SleekXMPP into roster
Diffstat (limited to 'sleekxmpp/xmlstream/handler')
-rw-r--r-- | sleekxmpp/xmlstream/handler/waiter.py | 7 |
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: |