diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-04-01 09:09:43 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-04-01 09:09:43 (GMT) |
commit | a7726624239367a72f5117700e675d5915a40714 (patch) | |
tree | c652b52421bd4b592ea95451483bb859e2888430 /Modules/socketmodule.c | |
parent | f8521d55ad8f3d52bdf7a350214581e2888c0361 (diff) | |
download | cpython-a7726624239367a72f5117700e675d5915a40714.zip cpython-a7726624239367a72f5117700e675d5915a40714.tar.gz cpython-a7726624239367a72f5117700e675d5915a40714.tar.bz2 |
Issue #23618: Fix EINTR handling on Windows
Windows uses WSAEINTR error code, not EINTR, for socket functions.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index fd73e08..fcb1ff4 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -2476,7 +2476,7 @@ internal_connect(PySocketSockObject *s, struct sockaddr *addr, int addrlen, } err = GET_ERROR; - if (err == EINTR && PyErr_CheckSignals()) + if (CHECK_ERRNO(EINTR) && PyErr_CheckSignals()) return -1; wait_connect = (s->sock_timeout > 0 && err == IN_PROGRESS_ERR @@ -2488,7 +2488,7 @@ internal_connect(PySocketSockObject *s, struct sockaddr *addr, int addrlen, if (timeout == -1) { /* select() failed */ err = GET_ERROR; - if (err == EINTR && PyErr_CheckSignals()) + if (CHECK_ERRNO(EINTR) && PyErr_CheckSignals()) return -1; return err; } |