1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

Curl_open: restore default MAXCONNECTS to 5

At some point recently we lost the default value for the easy handle's
connection cache, and this change puts it back to 5 - which is the
former default value and it is documented in the curl_easy_setopt.3 man
page.
This commit is contained in:
Daniel Stenberg 2013-04-05 09:20:04 +02:00
parent e5d25b6c68
commit e7c56a8406
2 changed files with 3 additions and 4 deletions

View File

@ -617,12 +617,9 @@ CURLcode Curl_open(struct SessionHandle **curl)
data->wildcard.state = CURLWC_INIT; data->wildcard.state = CURLWC_INIT;
data->wildcard.filelist = NULL; data->wildcard.filelist = NULL;
data->set.fnmatch = ZERO_NULL; data->set.fnmatch = ZERO_NULL;
/* This no longer creates a connection cache here. It is instead made on data->set.maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
the first call to curl_easy_perform() or when the handle is added to a
multi stack. */
} }
if(res) { if(res) {
Curl_resolver_cleanup(data->state.resolver); Curl_resolver_cleanup(data->state.resolver);
if(data->state.headerbuff) if(data->state.headerbuff)

View File

@ -58,6 +58,8 @@
#define CURL_DEFAULT_USER "anonymous" #define CURL_DEFAULT_USER "anonymous"
#define CURL_DEFAULT_PASSWORD "ftp@example.com" #define CURL_DEFAULT_PASSWORD "ftp@example.com"
#define DEFAULT_CONNCACHE_SIZE 5
/* length of longest IPv6 address string including the trailing null */ /* length of longest IPv6 address string including the trailing null */
#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255") #define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")