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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user