From cdf0b353dbd47cfd9686c70d6a5cb000cee86d2e Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 3 Apr 2012 11:02:55 -0700 Subject: Fix memory leak with adhoc command sessions. Fixes issue #155 --- sleekxmpp/plugins/xep_0050/adhoc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sleekxmpp/plugins/xep_0050') 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): """ -- cgit v1.2.3