summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 8f571a2..8e804af 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -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