From a236adfb578f5cf5bd00b1d3bbbb6b495feb9773 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 18 Dec 2022 11:00:33 +0100 Subject: [PATCH] No need to retry if confirmed not found --- src/utils/push/useConnect.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/push/useConnect.ts b/src/utils/push/useConnect.ts index 9e961753..1a79e6d3 100644 --- a/src/utils/push/useConnect.ts +++ b/src/utils/push/useConnect.ts @@ -35,7 +35,11 @@ const pushUseConnect = () => { }), { enabled: false, - retry: 10, + retry: (failureCount, error) => { + if (error.status == 404) return false + + return failureCount < 10 + }, retryOnMount: false, refetchOnMount: false, refetchOnWindowFocus: false,