electrum

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

commit 4038b81a2239fd85b89f3d6124d01f02379ca475
parent 8e95706763b542062ec818fe88d7dd635448a3ab
Author: thomasv <thomasv@gitorious>
Date:   Mon, 22 Oct 2012 14:56:59 +0200

catch exception when client is disconnected

Diffstat:
Mlib/interface.py | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/interface.py b/lib/interface.py @@ -295,8 +295,13 @@ class Interface(threading.Thread): self.message_id += 1 out += request + '\n' while out: - sent = self.s.send( out ) - out = out[sent:] + try: + sent = self.s.send( out ) + out = out[sent:] + except: + # this happens when we get disconnected + print "Not connected, cannot send" + return None return ids