summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-04-03 11:02:55 -0700
committerLance Stout <lancestout@gmail.com>2012-04-03 11:02:55 -0700
commitcdf0b353dbd47cfd9686c70d6a5cb000cee86d2e (patch)
treefbde18a15c6ad17cea01817d71accbe4ea77c593
parent48504ed5e2ac51402778fce26f64e418f4b9529f (diff)
downloadslixmpp-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.py7
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):
"""