1
0
mirror of synced 2024-11-24 15:50:16 +01:00

sys: Warn user if a net request fails while a proxy is set (#821)

* tell the user if he have a proxy set

* Improved log message

Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
iTrooz_ 2022-11-25 10:39:45 +01:00 committed by GitHub
parent b10a59661e
commit 217cf799c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,6 +124,9 @@ namespace hex {
char *url = nullptr;
curl_easy_getinfo(this->m_ctx, CURLINFO_EFFECTIVE_URL, &url);
log::error("Net request '{0}' failed with error {1}: '{2}'", url, u32(result), curl_easy_strerror(result));
if(!Net::s_proxyUrl.empty()){
log::info("A custom proxy '{}' is in use. Is it working correctly?", Net::s_proxyUrl);
}
}
long responseCode = 0;
@ -279,4 +282,4 @@ namespace hex {
Net::s_proxyUrl = url;
}
}
}