From 2dbac8cd0ce2e60d7ff5972006532d6631b07b21 Mon Sep 17 00:00:00 2001 From: Hung Nguyen Date: Wed, 21 May 2025 10:36:47 +0700 Subject: [PATCH] fix(lcm): Refresh token during retry for read would block error --- VERSION | 2 +- lib/gooddata/rest/connection.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a26bc9024..30beed016 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.7.83 +3.7.84 diff --git a/lib/gooddata/rest/connection.rb b/lib/gooddata/rest/connection.rb index 7ee2e4ce6..4c1a3642e 100644 --- a/lib/gooddata/rest/connection.rb +++ b/lib/gooddata/rest/connection.rb @@ -122,6 +122,12 @@ def retryable(options = {}, &_block) rescue RestClient::TooManyRequests, RestClient::ServiceUnavailable, *retry_exception => e logging_retry_error(e, retry_time) sleep retry_time + if OpenSSL::SSL.const_defined?(:SSLErrorWaitReadable) && e.is_a?(OpenSSL::SSL::SSLErrorWaitReadable) + GoodData.gd_logger.warn "Refresh token status=start retry_time=#{retry_time}. Error: #{e.message}" + options[:refresh_token].call # (dont_reauth: true) + GoodData.gd_logger.warn "Refresh token status=success retry_time=#{retry_time}. Error: #{e.message}" + end + # Total 10 retry requests with 1.5 coefficent should take ~ 2 mins to finish if (retries -= 1) > 0 retry_time *= RETRY_TIME_COEFFICIENT