summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-01 09:09:43 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-04-01 09:09:43 (GMT)
commita7726624239367a72f5117700e675d5915a40714 (patch)
treec652b52421bd4b592ea95451483bb859e2888430 /Modules/socketmodule.c
parentf8521d55ad8f3d52bdf7a350214581e2888c0361 (diff)
downloadcpython-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.c4
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;
}