From: Victor Stinner Date: Mon, 6 Apr 2015 20:30:41 +0000 (+0200) Subject: Issue #22117: Fix sock_call_ex() for non-blocking socket X-Git-Tag: v3.5.0a4~152 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=222dfc7d94a785bd710642a8917aefa70e1ea714;p=thirdparty%2FPython%2Fcpython.git 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)! --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index f27e69729c95..1ecec5a3b9cb 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) {