Make curl resolve over IPv4

This commit is contained in:
Michał Janiszewski 2018-01-29 21:28:00 +01:00 committed by Michał Janiszewski
parent c672e6098c
commit 759171186c
1 changed files with 2 additions and 0 deletions

View File

@ -198,6 +198,8 @@ static http_response_t *http_request(const HttpRequest2 &request)
curl_easy_setopt(curl, CURLOPT_URL, request.Url.c_str());
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &writeBuffer);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, http_request_write_func);
// Force resolving to IPv4 to fix issues where advertising over IPv6 does not work
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curlResult = curl_easy_perform(curl);