From e02bf9fb1ad90ebf62802346e1c777a91d120fa9 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 26 Sep 2023 16:09:24 +0200 Subject: [PATCH] Log timeout when a httpfetch times out --- src/httpfetch.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp index 3fb7f3d6a..a966d4855 100644 --- a/src/httpfetch.cpp +++ b/src/httpfetch.cpp @@ -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