diff options
author | Lance Stout <lancestout@gmail.com> | 2011-02-13 16:28:06 -0500 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-02-13 16:28:06 -0500 |
commit | 70af52d74c3f4253791120be4016f108aa966b4d (patch) | |
tree | 89d354b18fab86b916698037a9d68878ed9e00db /sleekxmpp | |
parent | ca2b4a188ac31d1bdf45ec244c950f7675414b38 (diff) | |
download | slixmpp-70af52d74c3f4253791120be4016f108aa966b4d.tar.gz slixmpp-70af52d74c3f4253791120be4016f108aa966b4d.tar.bz2 slixmpp-70af52d74c3f4253791120be4016f108aa966b4d.tar.xz slixmpp-70af52d74c3f4253791120be4016f108aa966b4d.zip |
Make one-off Callbacks ready for deletion after the prerun step.
Waiting until the actual run step means that the handler is not
marked for deletion when checked in the __spawn_event() thread,
causing the callback to stay in the handler list.
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/xmlstream/handler/callback.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/handler/callback.py b/sleekxmpp/xmlstream/handler/callback.py index f0a72853..cfd3c43c 100644 --- a/sleekxmpp/xmlstream/handler/callback.py +++ b/sleekxmpp/xmlstream/handler/callback.py @@ -62,6 +62,8 @@ class Callback(BaseHandler): payload -- The matched stanza object. """ BaseHandler.prerun(self, payload) + if self._once: + self._destroy = True if self._instream: self.run(payload, True) |