enable http pipelining, changed max connection limit to 10
This commit is contained in:
parent
c4c0f1fd9a
commit
7b75e1ea41
|
@ -91,6 +91,8 @@ static CURL *Link_to_curl(Link *link)
|
|||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15);
|
||||
curl_easy_setopt(curl, CURLOPT_SHARE, CURL_SHARE);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_memory_callback);
|
||||
// curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
|
||||
if (NETWORK_CONFIG.username) {
|
||||
curl_easy_setopt(curl, CURLOPT_USERNAME, NETWORK_CONFIG.username);
|
||||
|
|
|
@ -234,6 +234,7 @@ LinkTable *network_init(const char *url)
|
|||
}
|
||||
curl_multi_setopt(curl_multi, CURLMOPT_MAX_TOTAL_CONNECTIONS,
|
||||
NETWORK_CONFIG.max_conns);
|
||||
curl_multi_setopt(curl_multi, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
|
||||
|
||||
/* ------------ Initialise locks ---------*/
|
||||
if (pthread_mutex_init(&transfer_lock, NULL) != 0) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "link.h"
|
||||
|
||||
#define NETWORK_MAX_CONNS 20
|
||||
#define NETWORK_MAX_CONNS 10
|
||||
|
||||
typedef struct {
|
||||
char *memory;
|
||||
|
|
Loading…
Reference in New Issue