Break from handle_write() if nothing was sent

asyncore will return 0 if the socket raised EWOULDBLOCK on the send()
call
This commit is contained in:
Tyler Hobbs
2014-01-14 17:55:40 -06:00
parent 77bf3ea22f
commit 3e39275ea0

View File

@@ -246,6 +246,8 @@ class AsyncoreConnection(Connection, asyncore.dispatcher):
if sent < len(next_msg):
with self.deque_lock:
self.deque.appendleft(next_msg[sent:])
if sent == 0:
return
def handle_read(self):
try: