diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-09-20 12:03:50 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-09-20 12:03:50 +0000 |
commit | 71920d61e6c0f38f91a7ba471505de031d568ff7 (patch) | |
tree | e356bbbd5cdc9a5b51eba671a1cb0e9f895d35c6 /lib/multi.c | |
parent | 5de75eee5691b56dc95f53340f18d650b246f0a3 (diff) |
Michael Wallner's test program again help me track down a problem. This time
it basically was that we didn't remove the current connection from the pipe
list when following a redirect. Also in this commit: several cases of
additional debug code for debug builds helping to check and track down some
signs of run-time trouble.
Diffstat (limited to 'lib/multi.c')
-rw-r--r-- | lib/multi.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/multi.c b/lib/multi.c index 2f7f32870..2da17a3f0 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -424,12 +424,12 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, /* increase the node-counter */ multi->num_easy++; - if((multi->num_easy+5) > multi->connc->num) { - /* we want the connection cache to have room for all easy transfers, and - some more so we have a margin of 5 for now, but we add the new amount - plus 10 to not have to do it for every new handle added */ + if((multi->num_easy * 4) > multi->connc->num) { + /* We want the connection cache to have plenty room. Before we supported + the shared cache every single easy handle had 5 entries in their cache + by default. */ CURLcode res = Curl_ch_connc(easy_handle, multi->connc, - multi->num_easy + 10); + multi->connc->num*4); if(res) /* TODO: we need to do some cleaning up here! */ return res; @@ -1111,13 +1111,10 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* call this even if the readwrite function returned error */ Curl_posttransfer(easy->easy_handle); - if (retry) { - Curl_removeHandleFromPipeline(easy->easy_handle, - easy->easy_conn->recv_pipe); - } - /* When we follow redirects, must to go back to the CONNECT state */ if(easy->easy_handle->reqdata.newurl || retry) { + Curl_removeHandleFromPipeline(easy->easy_handle, + easy->easy_conn->recv_pipe); if(!retry) { /* if the URL is a follow-location and not just a retried request then figure out the URL here */ |