diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-10-18 17:32:01 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-10-19 14:43:49 +0200 |
commit | 5c3d8d20a6cf21daef2c265daa840afde9d7de3f (patch) | |
tree | 4c35167ad5587fb80035e77dd19699676cc39898 /lib | |
parent | a34c7ce7546f39f24692925d66c2f42324dd94e9 (diff) |
curl_multi_add_handle: set timeouts in closure handles
The closure handle only ever has default timeouts set. To improve the
state somewhat we clone the timeouts from each added handle so that the
closure handle always has the same timeouts as the most recently added
easy handle.
Fixes #739
Diffstat (limited to 'lib')
-rw-r--r-- | lib/multi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c index 8e4091687..e81f5aadd 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -462,6 +462,14 @@ CURLMcode curl_multi_add_handle(struct Curl_multi *multi, handle is added */ memset(&multi->timer_lastcall, 0, sizeof(multi->timer_lastcall)); + /* The closure handle only ever has default timeouts set. To improve the + state somewhat we clone the timeouts from each added handle so that the + closure handle always has the same timeouts as the most recently added + easy handle. */ + multi->closure_handle->set.timeout = data->set.timeout; + multi->closure_handle->set.server_response_timeout = + data->set.server_response_timeout; + update_timer(multi); return CURLM_OK; } |