From e08d4d1002f8b46c8b077793394ab39f81607888 Mon Sep 17 00:00:00 2001 From: Abhinav-grd Date: Fri, 13 Aug 2021 09:12:01 +0530 Subject: [PATCH] specify time unit variable name retrySleepTimeInMilliSeconds --- src/utils/network/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/network/index.ts b/src/utils/network/index.ts index de1d322e0..4e95747dc 100644 --- a/src/utils/network/index.ts +++ b/src/utils/network/index.ts @@ -1,6 +1,6 @@ import { sleep } from 'utils/common'; -const retrySleepTime = [2000, 5000, 10000]; +const retrySleepTimeInMilliSeconds = [2000, 5000, 10000]; export async function retryAsyncFunction( func: () => Promise, @@ -11,7 +11,7 @@ export async function retryAsyncFunction( return resp; } catch (e) { if (retryCount > 0) { - await sleep(retrySleepTime[3 - retryCount]); + await sleep(retrySleepTimeInMilliSeconds[3 - retryCount]); await retryAsyncFunction(func, retryCount - 1); } else { throw e;