From bbcf40c604ddbc5c0dea5c6a17b5aee975a1c851 Mon Sep 17 00:00:00 2001 From: thesunita <31236585+thesunita@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:30:28 +0530 Subject: [PATCH] fix: to show 'Queue restoration timeout' only once (#1013) Co-authored-by: Sunita Prajapati <> --- packages/core/src/plugins/QueueFlushingPlugin.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/core/src/plugins/QueueFlushingPlugin.ts b/packages/core/src/plugins/QueueFlushingPlugin.ts index 49279366..4ca749aa 100644 --- a/packages/core/src/plugins/QueueFlushingPlugin.ts +++ b/packages/core/src/plugins/QueueFlushingPlugin.ts @@ -84,15 +84,15 @@ export class QueueFlushingPlugin extends UtilityPlugin { } } catch (e) { // If the queue is not restored before the timeout, we will notify but not block flushing events - this.analytics?.reportInternalError( - new SegmentError( - ErrorType.InitializationError, - 'Queue restoration timeout', - e - ) - ); - if (this.timeoutWarned === false) { + this.analytics?.reportInternalError( + new SegmentError( + ErrorType.InitializationError, + 'Queue restoration timeout', + e + ) + ); + this.analytics?.logger.warn( 'Flush triggered but queue restoration and settings loading not complete. Flush will be retried.', e