git://git.novaco.in
/
electrum-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
stop session immediately if handshake fails; move some code
[electrum-server.git]
/
processor.py
diff --git
a/processor.py
b/processor.py
index
9fa9378
..
0ad86ff
100644
(file)
--- a/
processor.py
+++ b/
processor.py
@@
-177,6
+177,12
@@
class RequestDispatcher(threading.Thread):
sessions = self.sessions[:]
active_sessions = []
+
+ now = time.time()
+ for session in sessions:
+ 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