summaryrefslogtreecommitdiff
path: root/slixmpp/stanza
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2015-03-03 16:05:47 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2015-04-04 16:48:30 +0200
commitb6b0e82dec7b322a2b690439e663432be2b92e82 (patch)
treee8b4d0e94e7ca6ccf700827a4a589abc9b9a15c9 /slixmpp/stanza
parent632b7b4afe290d533189eff27482a43aec816076 (diff)
downloadslixmpp-b6b0e82dec7b322a2b690439e663432be2b92e82.tar.gz
slixmpp-b6b0e82dec7b322a2b690439e663432be2b92e82.tar.bz2
slixmpp-b6b0e82dec7b322a2b690439e663432be2b92e82.tar.xz
slixmpp-b6b0e82dec7b322a2b690439e663432be2b92e82.zip
Iq.send: set the timeout even when no timeout_callback is set
Diffstat (limited to 'slixmpp/stanza')
-rw-r--r--slixmpp/stanza/iq.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/slixmpp/stanza/iq.py b/slixmpp/stanza/iq.py
index 2730314f..a64dfa7f 100644
--- a/slixmpp/stanza/iq.py
+++ b/slixmpp/stanza/iq.py
@@ -152,7 +152,7 @@ class Iq(RootStanza):
new_iq['type'] = 'result'
return new_iq
- def send(self, callback=None, timeout=None, timeout_callback=None, coroutine=False):
+ def send(self, callback=None, timeout=None, timeout_callback=None):
"""Send an <iq> stanza over the XML stream.
A callback handler can be provided that will be executed when the Iq
@@ -193,7 +193,7 @@ class Iq(RootStanza):
else:
future.set_result(result)
- if timeout_callback is not None and timeout is not None:
+ if timeout is not None:
self.stream.cancel_schedule('IqTimeout_%s' % self['id'])
if callback is not None:
callback(result)
@@ -210,7 +210,7 @@ class Iq(RootStanza):
constr = CoroutineCallback
else:
constr = Callback
- if timeout_callback is not None and timeout is not None:
+ if timeout is not None:
self.stream.schedule('IqTimeout_%s' % self['id'],
timeout,
callback_timeout,