tfix: make sure that the message is completely sent - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 705fd76767862d4cfe800a41c290f8d9bb2faa59
DIR parent 742705b8559a77b6c9bcc7a21b3cab700668eea8
HTML Author: ThomasV <thomasv@gitorious>
Date: Sat, 19 May 2012 16:52:59 +0200
fix: make sure that the message is completely sent
Diffstat:
M lib/interface.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
DIR diff --git a/lib/interface.py b/lib/interface.py
t@@ -269,7 +269,10 @@ class TcpStratumInterface(Interface):
#print "-->",request
self.message_id += 1
out += request + '\n'
- self.s.send( out )
+
+ while out:
+ sent = self.s.send( out )
+ out = out[sent:]
def get_history(self, addr):
self.send([('blockchain.address.get_history', [addr])])