mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +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)
|
once=True)
|
||||||
self.stream.register_handler(handler)
|
self.stream.register_handler(handler)
|
||||||
StanzaBase.send(self)
|
StanzaBase.send(self)
|
||||||
return None
|
return handler
|
||||||
elif block and self['type'] in ('get', 'set'):
|
elif block and self['type'] in ('get', 'set'):
|
||||||
waitfor = Waiter('IqWait_%s' % self['id'], MatcherId(self['id']))
|
waitfor = Waiter('IqWait_%s' % self['id'], MatcherId(self['id']))
|
||||||
self.stream.register_handler(waitfor)
|
self.stream.register_handler(waitfor)
|
||||||
|
|
Loading…
Reference in a new issue