From b6b0e82dec7b322a2b690439e663432be2b92e82 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 3 Mar 2015 16:05:47 +0100 Subject: Iq.send: set the timeout even when no timeout_callback is set --- slixmpp/stanza/iq.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'slixmpp/stanza') 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 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, -- cgit v1.2.3