From 0e7e82a6072965c3a845a7acdbae6175309f74f0 Mon Sep 17 00:00:00 2001 From: Jithesh Poojary Date: Fri, 23 Feb 2024 18:21:42 +0530 Subject: [PATCH] Review comment addressed --- Conductor/Client/ApiClient.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Conductor/Client/ApiClient.cs b/Conductor/Client/ApiClient.cs index 9f85a70..72baba1 100644 --- a/Conductor/Client/ApiClient.cs +++ b/Conductor/Client/ApiClient.cs @@ -184,11 +184,9 @@ private RestResponse RetryRestClientCallApi(String path, Method method, List(response.Content); - if (JsonContent["error"].ToString() == "EXPIRED_TOKEN" && retryCount < Constants.MAX_TOKEN_REFRESH_RETRY_COUNT) + if (JsonContent["error"].ToString() == "EXPIRED_TOKEN") { string refreshToken = configuration.GetRefreshToken(); headerParams["X-Authorization"] = refreshToken; - isTokenRefreshed = true; retryCount++; } } - - if (!isTokenRefreshed) + else + { break; + } } return response; }