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:
@@ -130,6 +130,8 @@ class GreenSSLSocket(__ssl.SSLSocket):
|
|||||||
while (count < amount):
|
while (count < amount):
|
||||||
v = self.send(data[count:])
|
v = self.send(data[count:])
|
||||||
count += v
|
count += v
|
||||||
|
if v == 0:
|
||||||
|
trampoline(self, write=True, timeout_exc=timeout_exc('timed out'))
|
||||||
return amount
|
return amount
|
||||||
else:
|
else:
|
||||||
while True:
|
while True:
|
||||||
|
Reference in New Issue
Block a user