FailoverApp.HealthCheck: updated code to catch correct exception.

This commit is contained in:
Shreyas Zare
2024-11-23 13:07:42 +05:30
parent 524ad2d7f2
commit f9cb4b2a87

View File

@@ -430,7 +430,7 @@ namespace Failover
return new HealthCheckResponse(HealthStatus.Failed, "Received HTTP status code: " + (int)httpResponse.StatusCode + " " + httpResponse.StatusCode.ToString() + "; URL: " + url.AbsoluteUri);
}
catch (TaskCanceledException ex)
catch (OperationCanceledException ex)
{
lastReason = "Connection timed out.";
lastException = ex;