summaryrefslogtreecommitdiff
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-06 22:30:41 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-04-06 22:30:41 +0200
commit222dfc7d94a785bd710642a8917aefa70e1ea714 (patch)
treee48de2116f6ce72a0ddbbf3a140765eade3b5da0 /Modules/socketmodule.c
parent8912d1418e6b336c21bbe21c0dd123332bbe5ab5 (diff)
downloadcpython-git-222dfc7d94a785bd710642a8917aefa70e1ea714.tar.gz
Issue #22117: Fix sock_call_ex() for non-blocking socket
Call internal_select() with a timeout of 0 second, not a timeout of -1 second (blocking)!
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index f27e69729c..1ecec5a3b9 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -742,7 +742,7 @@ sock_call_ex(PySocketSockObject *s,
res = 1;
}
else {
- res = internal_select(s, writing, -1, connect);
+ res = internal_select(s, writing, timeout, connect);
}
if (res == -1) {