mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #23618: Fix EINTR handling on Windows
Windows uses WSAEINTR error code, not EINTR, for socket functions.
This commit is contained in:
parent
f8521d55ad
commit
a772662423
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue