cpython: 7ed567ad8b4c (original) (raw)

Mercurial > cpython

changeset 95336:7ed567ad8b4c

Issue #23618: Enhance EINTR handling in socket.connect() Call PyErr_CheckSignals() immediatly if connect() or select() fails with EINTR in internal_connect(). Refactor also the code to limit indentaton and make it more readable. [#23618]

Victor Stinner victor.stinner@gmail.com
date Tue, 31 Mar 2015 22:03:59 +0200
parents 4fad2b9fc4e6
children 87af6deb5d26
files Modules/socketmodule.c
diffstat 1 files changed, 40 insertions(+), 38 deletions(-)[+] [-] Modules/socketmodule.c 78

line wrap: on

line diff

--- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -2461,52 +2461,54 @@ internal_connect(PySocketSockObject *s,

define TIMEOUT_ERR EWOULDBLOCK

#endif

-

+

Py_BEGIN_ALLOW_THREADS res = connect(s->sock_fd, addr, addrlen); Py_END_ALLOW_THREADS

-

-

-

+

+

+

+

+

#undef GET_ERROR #undef IN_PROGRESS_ERR