summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-08-07 23:30:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-08-07 23:30:05 +0200
commitc771968ab6e842ecda4043a6e8d553457543816e (patch)
tree12fec6a9409e53b0f8af895e43f204fdbde3c8cd
parentb61e8b81f50385e9fa332990ffef53c0893b6cd1 (diff)
downloadcurl-c771968ab6e842ecda4043a6e8d553457543816e.tar.gz
Curl_socket_check: fix timeout return value for select users
This is the same fix applied for the conditional code that uses select() that was already done for the poll specific code in commit b61e8b81f5038.
-rw-r--r--lib/select.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/select.c b/lib/select.c
index 4196211c0..32b6fa55f 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -306,8 +306,10 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */
break;
if(timeout_ms > 0) {
pending_ms = timeout_ms - elapsed_ms;
- if(pending_ms <= 0)
+ if(pending_ms <= 0) {
+ r = 0; /* Simulate a "call timed out" case */
break;
+ }
}
} while(r == -1);