if len(ready_to_read) == 1:
try:
data = self.sock.recv(64 * 1024)
//print("got", len(data), "bytes")
p = zlib.decompress(data)
obj = pickle.loads(p)
except Exception as e:
After Change
try:
data = self.read(self.sock)
//print("got", len(data), "bytes")
self.lastread = time.time()
p = zlib.decompress(data)
obj = pickle.loads(p)
except Exception as e:
print(e)
print("error: server may have died")
self.reset()
return None