Fix memory leak with adhoc command sessions.

Fixes issue #155
This commit is contained in:
Lance Stout 2012-04-03 11:02:55 -07:00
parent 48504ed5e2
commit cdf0b353db

View file

@ -565,10 +565,11 @@ class XEP_0050(BasePlugin):
session -- All stored data relevant to the current session -- All stored data relevant to the current
command session. command session.
""" """
sessionid = 'client:' + session['id']
try: try:
del self.sessions[session['id']] del self.sessions[sessionid]
except: except Exception as e:
pass log.error("Error deleting adhoc command session: %s" % e.message)
def _handle_command_result(self, iq): def _handle_command_result(self, iq):
""" """