electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit e9f89826d7458ee475104666a4f9f0923143f0d0
parent c6c8c5c077d0799176b038fefb291fe4690fed27
Author: ThomasV <thomasv@gitorious>
Date:   Thu, 15 Mar 2012 15:18:07 +0300

handle socket error

Diffstat:
Mserver/server.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/server/server.py b/server/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: