mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:43:47 +03:00
conncache: count shutdowns against host and max limits
Count connections to a host against a possibly configured destination limit. Trigger multi `connchange` when a connection has been shutdown, so pending transfers can try to get a connection once again. Reported-by: baranyaib90 on github Fixes #15857 Closes #15879
This commit is contained in:
parent
508861eb80
commit
bd3c027ac9
5 changed files with 102 additions and 21 deletions
10
lib/multi.c
10
lib/multi.c
|
|
@ -3031,9 +3031,11 @@ CURLMcode curl_multi_perform(CURLM *m, int *running_handles)
|
|||
|
||||
sigpipe_apply(multi->cpool.idata, &pipe_st);
|
||||
Curl_cpool_multi_perform(multi);
|
||||
|
||||
sigpipe_restore(&pipe_st);
|
||||
|
||||
if(multi_ischanged(m, TRUE))
|
||||
process_pending_handles(m);
|
||||
|
||||
/*
|
||||
* Simply remove all expired timers from the splay since handles are dealt
|
||||
* with unconditionally by this function and curl_multi_timeout() requires
|
||||
|
|
@ -3629,6 +3631,9 @@ out:
|
|||
}
|
||||
sigpipe_restore(&mrc.pipe_st);
|
||||
|
||||
if(multi_ischanged(multi, TRUE))
|
||||
process_pending_handles(multi);
|
||||
|
||||
if(running_handles)
|
||||
*running_handles = (int)multi->num_alive;
|
||||
|
||||
|
|
@ -3686,9 +3691,6 @@ CURLMcode curl_multi_setopt(CURLM *m,
|
|||
break;
|
||||
case CURLMOPT_MAX_TOTAL_CONNECTIONS:
|
||||
multi->max_total_connections = va_arg(param, long);
|
||||
/* for now, let this also decide the max number of connections
|
||||
* in shutdown handling */
|
||||
multi->max_shutdown_connections = va_arg(param, long);
|
||||
break;
|
||||
/* options formerly used for pipelining */
|
||||
case CURLMOPT_MAX_PIPELINE_LENGTH:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue