From: ThomasV Date: Mon, 25 Nov 2013 14:25:47 +0000 (+0400) Subject: fix another memory leak X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=commitdiff_plain;h=9fd8d787028b7ad349327409cf78658c76f5804d fix another memory leak --- diff --git a/processor.py b/processor.py index ec62d48..0ad86ff 100644 --- a/processor.py +++ b/processor.py @@ -177,9 +177,14 @@ class RequestDispatcher(threading.Thread): sessions = self.sessions[:] active_sessions = [] + now = time.time() for session in sessions: - if not session.stopped() and (now - session.time) < 1000: + if (now - session.time) > 1000: + session.stop() + + for session in sessions: + if not session.stopped(): # If session is still alive then re-add it back # to our internal register active_sessions.append(session)