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

STINNER Victor 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().

----------
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>
_______________________________________


More information about the New-bugs-announce mailing list