[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

Ben Darnell report at bugs.python.org
Fri Oct 19 20:04:29 EDT 2018


Ben Darnell <ben.darnell at gmail.com> added the comment:

We have an easy reproduction of this "[Errno 0] Error" on the server side in https://github.com/tornadoweb/tornado/issues/2504#issuecomment-426782158

It is triggered by a connection from `nc -z` (which I think is doing a TCP handshake and shutting down the connection cleanly, but I'm not sure. It might just send an RST instead of the clean shutdown). On macos, I get SSL_ERROR_EOF (as expected), but on linux it raises an OSError with errno 0. (Note that the script as posted has a small mistake in that it is using a client-side SSLContext on the server side. The same error is seen when that mistake is fixed) 

I'm going to add "errno 0" to the list of errors that Tornado should swallow silently here, so if you're trying to reproduce this in the future use Tornado 5.1.1.

----------
nosy: +Ben.Darnell

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31122>
_______________________________________


More information about the Python-bugs-list mailing list