Make sure SSL retries are done using the exact same data buffer
This commit is contained in:

committed by
Sergey Shepelev

parent
50f7940425
commit
5ec3a3cba8
@@ -162,11 +162,14 @@ class GreenSSLSocket(_original_sslsocket):
|
|||||||
self.__class__)
|
self.__class__)
|
||||||
amount = len(data)
|
amount = len(data)
|
||||||
count = 0
|
count = 0
|
||||||
|
data_to_send = data
|
||||||
while (count < amount):
|
while (count < amount):
|
||||||
v = self.send(data[count:])
|
v = self.send(data_to_send)
|
||||||
count += v
|
count += v
|
||||||
if v == 0:
|
if v == 0:
|
||||||
trampoline(self, write=True, timeout_exc=timeout_exc('timed out'))
|
trampoline(self, write=True, timeout_exc=timeout_exc('timed out'))
|
||||||
|
else:
|
||||||
|
data_to_send = data[count:]
|
||||||
return amount
|
return amount
|
||||||
else:
|
else:
|
||||||
while True:
|
while True:
|
||||||
|
Reference in New Issue
Block a user