[issue23879] asyncio: SelectorEventLoop.sock_connect() must not retry connect() on InterruptedError

Guido van Rossum report at bugs.python.org
Tue Apr 7 17:45:22 CEST 2015


Guido van Rossum added the comment:

LGTM.
On Apr 7, 2015 1:23 AM, "STINNER Victor" <report at bugs.python.org> wrote:

>
> 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().
>
> ----------
> components: asyncio
> files: connect_eintr.patch
> keywords: patch
> messages: 240195
> nosy: gvanrossum, haypo, yselivanov
> priority: normal
> severity: normal
> status: open
> 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>
> <http://bugs.python.org/issue23879>
> _______________________________________
>

----------

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


More information about the Python-bugs-list mailing list