From: Daniel Stenberg Date: Fri, 5 Apr 2013 07:20:04 +0000 (+0200) Subject: Curl_open: restore default MAXCONNECTS to 5 X-Git-Tag: curl-7_30_0~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e7c56a8406d0d751b8afc1daf2dcbb67c763c465;p=thirdparty%2Fcurl.git 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. --- diff --git a/lib/url.c b/lib/url.c index 8c8f8b07c3..33876478b0 100644 --- a/lib/url.c +++ b/lib/url.c @@ -617,12 +617,9 @@ CURLcode Curl_open(struct SessionHandle **curl) data->wildcard.state = CURLWC_INIT; data->wildcard.filelist = NULL; data->set.fnmatch = ZERO_NULL; - /* This no longer creates a connection cache here. It is instead made on - the first call to curl_easy_perform() or when the handle is added to a - multi stack. */ + data->set.maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */ } - if(res) { Curl_resolver_cleanup(data->state.resolver); if(data->state.headerbuff) diff --git a/lib/urldata.h b/lib/urldata.h index b63d8eed65..1113020eef 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -58,6 +58,8 @@ #define CURL_DEFAULT_USER "anonymous" #define CURL_DEFAULT_PASSWORD "ftp@example.com" +#define DEFAULT_CONNCACHE_SIZE 5 + /* 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")