git://git.novaco.in
/
electrum-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
4082eea
)
fix memory leak (caused by thread never terminating)
author
ThomasV
<thomasv@gitorious>
Sun, 24 Nov 2013 09:07:12 +0000 (13:07 +0400)
committer
ThomasV
<thomasv@gitorious>
Sun, 24 Nov 2013 09:07:12 +0000 (13:07 +0400)
transports/stratum_tcp.py
patch
|
blob
|
history
diff --git
a/transports/stratum_tcp.py
b/transports/stratum_tcp.py
index
5fb26a5
..
6c36086
100644
(file)
--- a/
transports/stratum_tcp.py
+++ b/
transports/stratum_tcp.py
@@
-67,7
+67,10
@@
class TcpClientResponder(threading.Thread):
def run(self):
while not self.session.stopped():
- response = self.session.response_queue.get()
+ try:
+ response = self.session.response_queue.get(timeout=10)
+ except queue.Empty:
+ continue
data = json.dumps(response) + "\n"
try:
while data: