Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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.
  • Loading branch information...
commit e7c56a8406d0d751b8afc1daf2dcbb67c763c465 1 parent e5d25b6
Daniel Stenberg authored April 05, 2013

Showing 2 changed files with 3 additions and 4 deletions. Show diff stats Hide diff stats

  1. 5  lib/url.c
  2. 2  lib/urldata.h
5  lib/url.c
@@ -617,12 +617,9 @@ CURLcode Curl_open(struct SessionHandle **curl)
617 617
     data->wildcard.state = CURLWC_INIT;
618 618
     data->wildcard.filelist = NULL;
619 619
     data->set.fnmatch = ZERO_NULL;
620  
-    /* This no longer creates a connection cache here. It is instead made on
621  
-       the first call to curl_easy_perform() or when the handle is added to a
622  
-       multi stack. */
  620
+    data->set.maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
623 621
   }
624 622
 
625  
-
626 623
   if(res) {
627 624
     Curl_resolver_cleanup(data->state.resolver);
628 625
     if(data->state.headerbuff)
2  lib/urldata.h
@@ -58,6 +58,8 @@
58 58
 #define CURL_DEFAULT_USER "anonymous"
59 59
 #define CURL_DEFAULT_PASSWORD "ftp@example.com"
60 60
 
  61
+#define DEFAULT_CONNCACHE_SIZE 5
  62
+
61 63
 /* length of longest IPv6 address string including the trailing null */
62 64
 #define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
63 65
 

0 notes on commit e7c56a8

Please sign in to comment.
Something went wrong with that request. Please try again.