mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-13 14:30:02 -04:00
limit max connections to 50
This commit is contained in:
parent
582bbd4ecd
commit
d79c07e2a4
5 changed files with 6 additions and 8 deletions
|
@ -192,6 +192,8 @@ void finish_request(CURLMsg *curl_msg) {
|
|||
void init_curl() {
|
||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||
multi_handle = curl_multi_init();
|
||||
curl_multi_setopt(multi_handle, CURLMOPT_MAX_TOTAL_CONNECTIONS, 50L);
|
||||
curl_multi_setopt(multi_handle, CURLMOPT_MAXCONNECTS, 40L);
|
||||
|
||||
FILE* file = fopen("/cacert.pem", "wb");
|
||||
fwrite(_cacert_pem, 1, _cacert_pem_len, file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue