git://git.novaco.in
/
electrum-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
d279585
)
handle socket error
author
ThomasV
<thomasv@gitorious>
Thu, 15 Mar 2012 12:18:07 +0000 (15:18 +0300)
committer
ThomasV
<thomasv@gitorious>
Thu, 15 Mar 2012 12:18:07 +0000 (15:18 +0300)
server.py
patch
|
blob
|
history
diff --git
a/server.py
b/server.py
index
cf0e291
..
f23c0c2
100755
(executable)
--- a/
server.py
+++ b/
server.py
@@
-693,12
+693,15
@@
def tcp_client_thread(ipaddr,conn):
msg = ''
while not stopping:
- d = conn.recv(1024)
- msg += d
+ try:
+ d = conn.recv(1024)
+ except socket.error:
+ d = ''
if not d:
close_session(session_id)
break
+ msg += d
while True:
s = msg.find('\n')
if s ==-1: