diff options
author | Lance Stout <lancestout@gmail.com> | 2012-04-03 11:02:55 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-04-03 11:02:55 -0700 |
commit | cdf0b353dbd47cfd9686c70d6a5cb000cee86d2e (patch) | |
tree | fbde18a15c6ad17cea01817d71accbe4ea77c593 | |
parent | 48504ed5e2ac51402778fce26f64e418f4b9529f (diff) | |
download | slixmpp-cdf0b353dbd47cfd9686c70d6a5cb000cee86d2e.tar.gz slixmpp-cdf0b353dbd47cfd9686c70d6a5cb000cee86d2e.tar.bz2 slixmpp-cdf0b353dbd47cfd9686c70d6a5cb000cee86d2e.tar.xz slixmpp-cdf0b353dbd47cfd9686c70d6a5cb000cee86d2e.zip |
Fix memory leak with adhoc command sessions.
Fixes issue #155
-rw-r--r-- | sleekxmpp/plugins/xep_0050/adhoc.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sleekxmpp/plugins/xep_0050/adhoc.py b/sleekxmpp/plugins/xep_0050/adhoc.py index 8f2ea5c2..d546c27d 100644 --- a/sleekxmpp/plugins/xep_0050/adhoc.py +++ b/sleekxmpp/plugins/xep_0050/adhoc.py @@ -565,10 +565,11 @@ class XEP_0050(BasePlugin): session -- All stored data relevant to the current command session. """ + sessionid = 'client:' + session['id'] try: - del self.sessions[session['id']] - except: - pass + del self.sessions[sessionid] + except Exception as e: + log.error("Error deleting adhoc command session: %s" % e.message) def _handle_command_result(self, iq): """ |