[issue17918] failed incoming SSL connection stays open forever

2013-05-06 Thread Peter Saveliev
New submission from Peter Saveliev: Important: only Python2 versions are affected. Python3 works OK. Possibly related issue: http://bugs.python.org/issue12378 (differs: see the line above) Having a server with SSLSocket waiting for connections, the incoming connection, failed on automatic

[issue17918] failed incoming SSL connection stays open forever

2013-05-06 Thread Peter Saveliev
Peter Saveliev added the comment: Possible solution would be something like that in SSLSocket.do_handshake(): try: self._sslobj.do_handshake() except SSLError as e: # or even any Exception? self._sock.close() raise e --

[issue17918] failed incoming SSL connection stays open forever

2013-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for reporting. For maximum backwards compatibility, the safer fix is to close the socket only in SSLSocket.accept(). Unfortunately I can't think of a way to write a unittest for it, so I'll just commit the fix. -- nosy: +pitrou

[issue17918] failed incoming SSL connection stays open forever

2013-05-06 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17918 ___

[issue17918] failed incoming SSL connection stays open forever

2013-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 85e5a93e534e by Antoine Pitrou in branch '2.7': Issue #17918: When using SSLSocket.accept(), if the SSL handshake failed on the new socket, the socket would linger indefinitely. http://hg.python.org/cpython/rev/85e5a93e534e -- nosy: