--- a/lib/select.c 2013-09-09 00:11:15.000000000 +0200 +++ b/lib/select.c 2014-09-30 11:12:35.734662560 +0200 @@ -108,8 +108,10 @@ int Curl_wait_ms(int timeout_ms) if(error && error_not_EINTR) break; 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); #endif /* USE_WINSOCK */ if(r) @@ -402,8 +404,10 @@ int Curl_poll(struct pollfd ufds[], unsi 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); @@ -465,8 +469,10 @@ int Curl_poll(struct pollfd ufds[], unsi 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);