Only restrict master server connection to IPv4 if -noipv6

This commit is contained in:
James R 2021-09-01 18:41:41 -07:00
parent 31943f30a1
commit 46a5ce4325

View file

@ -196,6 +196,8 @@ HMS_connect (const char *format, ...)
curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
if (M_CheckParm("-noipv6"))
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, cv_masterserver_timeout.value); curl_easy_setopt(curl, CURLOPT_TIMEOUT, cv_masterserver_timeout.value);