From 1c6f372fe6d385f96f6824dfc50b69e2ec9c66f7 Mon Sep 17 00:00:00 2001 From: RonWang Date: Tue, 5 Nov 2019 17:53:12 -0800 Subject: [PATCH] fix: use Math.pow() to replce ** for Node v6 support in retry-utility --- lib/utils/retry-utility.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/retry-utility.js b/lib/utils/retry-utility.js index ae2e895e..c4136b37 100644 --- a/lib/utils/retry-utility.js +++ b/lib/utils/retry-utility.js @@ -35,7 +35,7 @@ function retry(retryConfig, retryCall, shouldRetryCondition, callback) { let pollCount = -1; async.doWhilst( (loopCallback) => { - let retryInterval = retryConfig.base * (retryConfig.factor ** pollCount++); + let retryInterval = retryConfig.base * (Math.pow(retryConfig.factor, pollCount++)); // The very first call is not a retry and hence should not be penalised with a timeout. if (pollCount === 0) { retryInterval = 0;