removed CURL_LOCK_DATA_CONNECT to solve #36 without disabling HTTP2
This commit is contained in:
parent
b4292b089b
commit
ed37aa5ca0
|
@ -98,7 +98,6 @@ static CURL *Link_to_curl(Link *link)
|
|||
}
|
||||
/* set up some basic curl stuff */
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, NETWORK_CONFIG.user_agent);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 0);
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
|
||||
/* for following directories without the '/' */
|
||||
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 2);
|
||||
|
@ -107,12 +106,9 @@ 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_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
||||
|
||||
// curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
|
||||
|
||||
if (NETWORK_CONFIG.username) {
|
||||
curl_easy_setopt(curl, CURLOPT_USERNAME, NETWORK_CONFIG.username);
|
||||
}
|
||||
|
|
|
@ -237,9 +237,10 @@ LinkTable *network_init(const char *url)
|
|||
fprintf(stderr, "network_init(): curl_share_init() failed!\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
curl_share_setopt(CURL_SHARE, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
|
||||
curl_share_setopt(CURL_SHARE, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
|
||||
curl_share_setopt(CURL_SHARE, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
|
||||
curl_share_setopt(CURL_SHARE, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
|
||||
|
||||
if (pthread_mutex_init(&curl_lock, NULL) != 0) {
|
||||
printf(
|
||||
|
|
Loading…
Reference in New Issue