mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-12-24 11:50:53 +00:00
Return the registered callback when using iq.send(callback=foo).
Allows for a callback to be canceled by unregistering the returned handler.
This commit is contained in:
parent
0d32638379
commit
ca2b4a188a
1 changed files with 1 additions and 1 deletions
|
@ -195,7 +195,7 @@ class Iq(RootStanza):
|
|||
once=True)
|
||||
self.stream.register_handler(handler)
|
||||
StanzaBase.send(self)
|
||||
return None
|
||||
return handler
|
||||
elif block and self['type'] in ('get', 'set'):
|
||||
waitfor = Waiter('IqWait_%s' % self['id'], MatcherId(self['id']))
|
||||
self.stream.register_handler(waitfor)
|
||||
|
|
Loading…
Reference in a new issue