[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

STINNER Victor report at bugs.python.org
Fri Mar 26 18:47:47 CET 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

If I understood correctly, the patch only concerns non blocking socket if SSL_write() returns 0? If SSL_write() returns a non zero value, can you use: ssl_socket.send(data[count:])?

About the string identifier trick, you should add an assertion to ensure that identifiers are differents. Example:
--------
a = 'x' * 20000
# create a copy with a different memory address
b = a[0:] + a[1:]
assert (a == b) and (a is not b)
data = a, b
--------

See also issue #8222: enabling SSL_MODE_AUTO_RETRY on SSL sockets.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8240>
_______________________________________


More information about the Python-bugs-list mailing list