From 1bf03053e1b6c32665749c2468e9be6d42abfaab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 7 Jul 2025 15:36:07 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20sse=E9=87=8D?= =?UTF-8?q?=E8=AF=95=E6=94=B9=E4=B8=BA5=E6=AC=A1=20=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E6=8E=89=E7=BA=BF=E9=A2=91=E7=B9=81=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/sse.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/sse.ts b/src/utils/sse.ts index 89be1f6..059c8f8 100644 --- a/src/utils/sse.ts +++ b/src/utils/sse.ts @@ -11,10 +11,10 @@ export const initSSE = (url: any) => { url = url + '?Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID; const { data, error } = useEventSource(url, [], { autoReconnect: { - retries: 10, - delay: 3000, + retries: 5, + delay: 5000, onFailed() { - console.log('Failed to connect after 10 retries'); + console.log('Failed to connect after 5 retries'); } } });