From 578b161e31b792733c31b2f62b4e98c4273756db Mon Sep 17 00:00:00 2001 From: tore-statsig <74584483+tore-statsig@users.noreply.github.com> Date: Fri, 2 Aug 2024 11:29:56 -0700 Subject: [PATCH] fix: flush with timeout not respected by retries This method should best effort post and finish within the given timeout --- src/StatsigServer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StatsigServer.ts b/src/StatsigServer.ts index 251c217..e14053c 100644 --- a/src/StatsigServer.ts +++ b/src/StatsigServer.ts @@ -531,7 +531,7 @@ export default class StatsigServer { const controller = new AbortController(); const handle = setTimeout(() => controller.abort(), timeout); flushPromise = this._logger - .flush(false, controller.signal) + .flush(true, controller.signal) .then(() => clearTimeout(handle)); } else { flushPromise = this._logger.flush(false);