git://git.novaco.in
/
electrum-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
8116a50
)
remove inactive sessions after 1000s
author
ThomasV
<thomasv@gitorious>
Fri, 26 Apr 2013 12:48:59 +0000 (16:48 +0400)
committer
ThomasV
<thomasv@gitorious>
Fri, 26 Apr 2013 12:48:59 +0000 (16:48 +0400)
processor.py
patch
|
blob
|
history
diff --git
a/processor.py
b/processor.py
index
9fa9378
..
ec62d48
100644
(file)
--- a/
processor.py
+++ b/
processor.py
@@
-177,8
+177,9
@@
class RequestDispatcher(threading.Thread):
sessions = self.sessions[:]
active_sessions = []
+ now = time.time()
for session in sessions:
- if not session.stopped():
+ if not session.stopped() and (now - session.time) < 1000:
# If session is still alive then re-add it back
# to our internal register
active_sessions.append(session)