aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-08-27 22:32:51 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-08-28 00:07:12 +0200
commita691e044705f12715fcd3310a9832dd5de79bff0 (patch)
treeb28f8575c2cdc608f84399454246c78a49eb1247 /lib/multi.c
parent3d1a453d887a6272f48c241af6190d17891aef02 (diff)
multi_socket: improved 100-continue timeout handling
When waiting for a 100-continue response from the server, the Curl_readwrite() will refuse to run if called until the timeout has been reached. We timeout code in multi_socket() allows code to run slightly before the actual timeout time, so for test 154 it could lead to the function being executed but refused in Curl_readwrite() and then the application would just sit idling forever. This was detected with runtests.pl -e on test 154.
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 6b4236198..fb495e078 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -2104,12 +2104,6 @@ static CURLMcode add_next_timeout(struct timeval now,
return CURLM_OK;
}
-#ifdef WIN32
-#define TIMEOUT_INACCURACY 40000
-#else
-#define TIMEOUT_INACCURACY 3000
-#endif
-
static CURLMcode multi_socket(struct Curl_multi *multi,
bool checkall,
curl_socket_t s,
@@ -2215,7 +2209,7 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
margin.
*/
- now.tv_usec += TIMEOUT_INACCURACY;
+ now.tv_usec += MULTI_TIMEOUT_INACCURACY;
if(now.tv_usec >= 1000000) {
now.tv_sec++;
now.tv_usec -= 1000000;