mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Analytics: Don't crash when a DNS resolve times out
This commit is contained in:
@ -192,6 +192,9 @@ HttpAnalyticsBackend::HttpAnalyticsBackend(const std::string& endpoint)
|
|||||||
CURL* curl = curl_easy_init();
|
CURL* curl = curl_easy_init();
|
||||||
if (curl)
|
if (curl)
|
||||||
{
|
{
|
||||||
|
// libcurl may not have been built with async DNS support, so we disable
|
||||||
|
// signal handlers to avoid a possible and likely crash if a resolve times out.
|
||||||
|
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, true);
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, endpoint.c_str());
|
curl_easy_setopt(curl, CURLOPT_URL, endpoint.c_str());
|
||||||
curl_easy_setopt(curl, CURLOPT_POST, true);
|
curl_easy_setopt(curl, CURLOPT_POST, true);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &DummyCurlWriteFunction);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &DummyCurlWriteFunction);
|
||||||
|
Reference in New Issue
Block a user