Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
b61e8b8.
  • Loading branch information...
commit c771968ab6e842ecda4043a6e8d553457543816e 1 parent b61e8b8
Daniel Stenberg authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/select.c
6 lib/select.c
View
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.