[Python-checkins] cpython: Issue #22117: Fix sock_call_ex() for non-blocking socket

victor.stinner python-checkins at python.org
Mon Apr 6 23:25:15 CEST 2015


https://hg.python.org/cpython/rev/af664f48b9b8
changeset:   95460:af664f48b9b8
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Mon Apr 06 22:30:41 2015 +0200
summary:
  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)!

files:
  Modules/socketmodule.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -742,7 +742,7 @@
                     res = 1;
             }
             else {
-                res = internal_select(s, writing, -1, connect);
+                res = internal_select(s, writing, timeout, connect);
             }
 
             if (res == -1) {

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list