git://git.novaco.in
/
electrum-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
878fe3c
)
fix: recv returns empty string if the connection is closed
author
ThomasV
<thomasv@gitorious>
Sun, 25 Mar 2012 21:59:48 +0000 (
01:59
+0400)
committer
ThomasV
<thomasv@gitorious>
Sun, 25 Mar 2012 21:59:48 +0000 (
01:59
+0400)
stratum.py
patch
|
blob
|
history
diff --git
a/stratum.py
b/stratum.py
index
a8a0e0c
..
cd3a431
100644
(file)
--- a/
stratum.py
+++ b/
stratum.py
@@
-136,7
+136,7
@@
class TcpClientRequestor(threading.Thread):
def update(self):
data = self.receive()
- if data is None:
+ if not data:
# close_session
self.session.stop()
return False
@@
-148,7
+148,7
@@
class TcpClientRequestor(threading.Thread):
try:
return self.session.connection().recv(1024)
except socket.error:
- return None
+ return ''
def parse(self):
raw_buffer = self.message.find('\n')