Kaydet (Commit) 0402dd18 authored tarafından Piers Lauder's avatar Piers Lauder

fix send method not noticing when partial sends happen

üst 1296a8d7
......@@ -222,7 +222,13 @@ class IMAP4:
def send(self, data):
"""Send data to remote."""
self.sock.send(data)
bytes = len(data)
while bytes > 0:
sent = self.sock.send(data)
if sent == bytes:
break # avoid copy
data = data[sent:]
bytes = bytes - sent
def shutdown(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment