[issue20951] SSLSocket.send() returns 0 for non-blocking socket

Nikolaus Rath report at bugs.python.org
Wed Mar 26 03:51:06 CET 2014


Nikolaus Rath added the comment:

On 03/25/2014 06:53 PM, Ben Darnell wrote:
> Another option may be to have SSLSocket.send() convert the WANT_WRITE exception into a socket.error with errno EAGAIN.  This wouldn't break Tornado and would make socket.send and SSLSocket.send more consistent, but it's weird to hide the true error like this.

I think that would only make sense if the SSLWant{Read/Write}Error
exceptions are eliminated completely, so that all methods raise
BlockingError (==EAGAIN) instead.

Raising BlockingError is marginally better than returning zero, but I
think not worth the change.

----------

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


More information about the Python-bugs-list mailing list