From e8e9761624b9f49abbbc51e56c29b63121c0398d Mon Sep 17 00:00:00 2001 From: Joshua Wood Date: Mon, 7 Feb 2022 10:57:36 -0800 Subject: [PATCH] Fix Faraday::Error::ConnectionFailed error Also fixed here https://github.com/librato/librato-metrics/pull/145 --- lib/librato/metrics/middleware/retry.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librato/metrics/middleware/retry.rb b/lib/librato/metrics/middleware/retry.rb index 3ab640e..7120552 100644 --- a/lib/librato/metrics/middleware/retry.rb +++ b/lib/librato/metrics/middleware/retry.rb @@ -16,7 +16,7 @@ def call(env) env[:body] = request_body # after failure is set to response body @app.call(env) rescue Librato::Metrics::ServerError, Timeout::Error, - Faraday::Error::ConnectionFailed + Faraday::ConnectionFailed if retries > 0 retries -= 1 and retry end @@ -28,4 +28,4 @@ def call(env) end end -end \ No newline at end of file +end