Log timeout when a httpfetch times out

This commit is contained in:
sfan5 2023-09-26 16:09:24 +02:00
parent 9ec40ce8e9
commit e02bf9fb1a

@ -387,8 +387,11 @@ const HTTPFetchResult * HTTPFetchOngoing::complete(CURLcode res)
} }
if (res != CURLE_OK) { if (res != CURLE_OK) {
errorstream << "HTTPFetch for " << request.url << " failed (" errorstream << "HTTPFetch for " << request.url << " failed: "
<< curl_easy_strerror(res) << ")" << std::endl; << curl_easy_strerror(res);
if (result.timeout)
errorstream << " (timeout = " << request.timeout << "ms)" << std::endl;
errorstream << std::endl;
} else if (result.response_code >= 400) { } else if (result.response_code >= 400) {
errorstream << "HTTPFetch for " << request.url errorstream << "HTTPFetch for " << request.url
<< " returned response code " << result.response_code << " returned response code " << result.response_code