limit max connections to 50

This commit is contained in:
ading2210 2024-02-26 22:52:06 -05:00
parent 582bbd4ecd
commit d79c07e2a4
5 changed files with 6 additions and 8 deletions

View file

@ -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);