Skip to content

Commit

Permalink
sending large messages (over 65535 bytes) fails #108
Browse files Browse the repository at this point in the history
  • Loading branch information
Ostico committed Oct 10, 2015
1 parent 3c5ac78 commit eb40386
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyorient/orient.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ def close(self):
self.connected = False

def write(self, buff):
return self._socket.send(buff)
count = 0
while count < len(buff):
count += self._socket.send(buff[count:])
return count

# The man page for recv says: The receive calls normally return
# any data available, up to the requested amount, rather than waiting
Expand Down

0 comments on commit eb40386

Please sign in to comment.