mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
cpool/cshutdown: force close connections under pressure
when CURLMOPT_MAX_HOST_CONNECTIONS or CURLMOPT_MAX_TOTAL_CONNECTIONS limits are reached, force close connections in shutdown to go below limit when possible. Fixes #17020 Reported-by: Fujii Hironori Closes #17022
This commit is contained in:
parent
9f8bdd0eae
commit
ff37657e4d
5 changed files with 108 additions and 34 deletions
|
|
@ -75,6 +75,12 @@ size_t Curl_cshutdn_count(struct Curl_easy *data);
|
|||
size_t Curl_cshutdn_dest_count(struct Curl_easy *data,
|
||||
const char *destination);
|
||||
|
||||
/* Close the oldest connection in shutdown to destination or,
|
||||
* when destination is NULL for any destination.
|
||||
* Return TRUE if a connection has been closed. */
|
||||
bool Curl_cshutdn_close_oldest(struct Curl_easy *data,
|
||||
const char *destination);
|
||||
|
||||
/* Add a connection to have it shut down. Will terminate the oldest
|
||||
* connection when total connection limit of multi is being reached. */
|
||||
void Curl_cshutdn_add(struct cshutdn *cshutdn,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue