Skip to content

Commit

Permalink
Log timeout when a httpfetch times out
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Oct 5, 2023
1 parent 9ec40ce commit e02bf9f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/httpfetch.cpp
Expand Up @@ -387,8 +387,11 @@ const HTTPFetchResult * HTTPFetchOngoing::complete(CURLcode res)
}

if (res != CURLE_OK) {
errorstream << "HTTPFetch for " << request.url << " failed ("
<< curl_easy_strerror(res) << ")" << std::endl;
errorstream << "HTTPFetch for " << request.url << " failed: "
<< curl_easy_strerror(res);
if (result.timeout)
errorstream << " (timeout = " << request.timeout << "ms)" << std::endl;
errorstream << std::endl;
} else if (result.response_code >= 400) {
errorstream << "HTTPFetch for " << request.url
<< " returned response code " << result.response_code
Expand Down

0 comments on commit e02bf9f

Please sign in to comment.