mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
ConnectionDone: default maxconnects to 4 x number of easy handles
... as documented!
This commit is contained in:
parent
1f60728f81
commit
2111c2ed07
@ -317,6 +317,9 @@ struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */
|
|||||||
multi->closure_handle->state.conn_cache = multi->conn_cache;
|
multi->closure_handle->state.conn_cache = multi->conn_cache;
|
||||||
|
|
||||||
multi->max_pipeline_length = 5;
|
multi->max_pipeline_length = 5;
|
||||||
|
|
||||||
|
/* -1 means it not set by user, use the default value */
|
||||||
|
multi->maxconnects = -1;
|
||||||
return (CURLM *) multi;
|
return (CURLM *) multi;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
@ -3190,7 +3190,8 @@ ConnectionDone(struct SessionHandle *data, struct connectdata *conn)
|
|||||||
{
|
{
|
||||||
/* data->multi->maxconnects can be negative, deal with it. */
|
/* data->multi->maxconnects can be negative, deal with it. */
|
||||||
size_t maxconnects =
|
size_t maxconnects =
|
||||||
(data->multi->maxconnects < 0) ? 0 : data->multi->maxconnects;
|
(data->multi->maxconnects < 0) ? data->multi->num_easy * 4:
|
||||||
|
data->multi->maxconnects;
|
||||||
struct connectdata *conn_candidate = NULL;
|
struct connectdata *conn_candidate = NULL;
|
||||||
|
|
||||||
/* Mark the current connection as 'unused' */
|
/* Mark the current connection as 'unused' */
|
||||||
|
Loading…
Reference in New Issue
Block a user