[New-bugs-announce] [issue23879] asyncio: SelectorEventLoop.sock_connect() must not retry connect() on InterruptedError
report at bugs.python.org
Tue Apr 7 10:23:09 CEST 2015
New submission from STINNER Victor:
According to the issue #23618, when connect() fails with EINTR, retrying connect() may only work on some platforms. To have a reliable behaviour on all platforms, we should wait until the socket becomes writable because the connection runs asynchronously in background. When the socket becomes writable, we have to gets its error code (getsockopt(SO_ERROR)) to check if the connection succeeded or failed.
Attached patch fixes SelectorEventLoop.sock_connect().
nosy: gvanrossum, haypo, yselivanov
title: asyncio: SelectorEventLoop.sock_connect() must not retry connect() on InterruptedError
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file38854/connect_eintr.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce