From 79c5f8ad824682be1af9bc40a1f4ea26bfb43f8c Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Fri, 16 Feb 2024 19:59:21 +0530 Subject: [PATCH] Reduced the async calls once per the provider if extensions provider call fails for LDEV-3828 --- core/src/main/cfml/context/admin/ext.functions.cfm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/main/cfml/context/admin/ext.functions.cfm b/core/src/main/cfml/context/admin/ext.functions.cfm index b3467f8e32..9e976c1b22 100644 --- a/core/src/main/cfml/context/admin/ext.functions.cfm +++ b/core/src/main/cfml/context/admin/ext.functions.cfm @@ -526,8 +526,13 @@ } } catch(e) { - // call it in background - getProviderInfoAsync(arguments.provider); + writeLog("Provider calls to #arguments.provider# failed with #e.message# #e.stacktrace#" , "error"); + if(!structKeyExists(request, "providerRetryCount") || !structKeyExists(request.providerRetryCount, arguments.provider)) request.providerRetryCount[arguments.provider] = 0; + + request.providerRetryCount[arguments.provider]++; + + // call it in the background once per the provider + if(request.providerRetryCount[arguments.provider] <= 1) getProviderInfoAsync(arguments.provider); } if(isNull(http.status_code)){