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; }