ssl: socket.sendall(): trampoline if sent 0 bytes; fixes CPU burn

https://bitbucket.org/which_linden/eventlet/issue/134/greenssl-performance-issues
This commit is contained in:
raylu
2013-01-11 17:14:13 +04:00
committed by Sergey Shepelev
parent c8418a10e4
commit 675a2df36b

View File

@@ -130,6 +130,8 @@ class GreenSSLSocket(__ssl.SSLSocket):
while (count < amount):
v = self.send(data[count:])
count += v
if v == 0:
trampoline(self, write=True, timeout_exc=timeout_exc('timed out'))
return amount
else:
while True: