aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenhttp/httpclient.cpp')
-rw-r--r--src/zenhttp/httpclient.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/zenhttp/httpclient.cpp b/src/zenhttp/httpclient.cpp
index 998eb27ea..1cfddb366 100644
--- a/src/zenhttp/httpclient.cpp
+++ b/src/zenhttp/httpclient.cpp
@@ -400,6 +400,13 @@ MeasureLatency(HttpClient& Client, std::string_view Url)
else
{
ErrorMessage = MeasureResponse.ErrorMessage(fmt::format("Unable to measure latency using {}", Url));
+
+ // Connection-level failures (timeout, refused, DNS) mean the endpoint is unreachable.
+ // Bail out immediately — retrying will just burn the connect timeout each time.
+ if (MeasureResponse.Error && MeasureResponse.Error->IsConnectionError())
+ {
+ break;
+ }
}
}