made the socket connection broken checking actually work

This commit is contained in:
jchu 2004-12-13 03:40:48 +00:00
parent c0b9a256aa
commit 18769e5b02

View file

@ -82,7 +82,7 @@ class ClientSocket(threading.Thread):
totalread = "" totalread = ""
while len(totalread) < size: while len(totalread) < size:
read = self.socket.recv(size-len(totalread)) read = self.socket.recv(size-len(totalread))
if read == 0: if len(read) == 0:
raise RuntimeError, "socket connection broken" raise RuntimeError, "socket connection broken"
totalread += read totalread += read
return totalread return totalread