]> granicus.if.org Git - python/commitdiff
Issue #22117: Fix sock_call_ex() for non-blocking socket
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 6 Apr 2015 20:30:41 +0000 (22:30 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 6 Apr 2015 20:30:41 +0000 (22:30 +0200)
Call internal_select() with a timeout of 0 second, not a timeout of -1 second
(blocking)!

Modules/socketmodule.c

index f27e69729c9547f787b7245f4ac41d70b03a9d3b..1ecec5a3b9cb78a810a8d23c6f8e5581831087da 100644 (file)
@@ -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) {