Commit 0cec8772 authored by Victor Stinner's avatar Victor Stinner

socket: Fix internal_select()

Bug found by Pavel Belikov ("Fragment N1"):
http://www.viva64.com/en/b/0414/#ID0ECDAE
parent 48e3f982
......@@ -648,7 +648,7 @@ internal_select(PySocketSockObject *s, int writing, _PyTime_t interval,
assert(!(connect && !writing));
/* Guard against closed socket */
if (s->sock_fd < 0)
if (s->sock_fd == INVALID_SOCKET)
return 0;
/* Prefer poll, if available, since you can poll() any fd
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment