From 1fb6b1870bebc347c2b690a3a04e376b985f8347 Mon Sep 17 00:00:00 2001 From: Richard Fontein <32132657+rifont@users.noreply.github.com> Date: Wed, 17 Apr 2024 17:09:57 +0100 Subject: [PATCH] Revert "Add exponential backoff with jitter for the In-App Notification Center to re-establish WebSocket connections" --- .../notification-center/src/hooks/useInitializeSocket.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/notification-center/src/hooks/useInitializeSocket.ts b/packages/notification-center/src/hooks/useInitializeSocket.ts index f53fbf4c8d2..c92138aa0e0 100644 --- a/packages/notification-center/src/hooks/useInitializeSocket.ts +++ b/packages/notification-center/src/hooks/useInitializeSocket.ts @@ -9,9 +9,6 @@ type IUseInitializeSocket = (args: { socketUrl: string }) => { disconnectSocket: () => void; }; -const RECONNECTION_DELAY_MAX = 60000 * 5; // 5 minutes -const RANDOMIZATION_FACTOR = 1; - export const useInitializeSocket: IUseInitializeSocket = ({ socketUrl }) => { const socketRef = useRef(null); @@ -33,8 +30,7 @@ export const useInitializeSocket: IUseInitializeSocket = ({ socketUrl }) => { if (token) { socketRef.current = io(socketUrl, { - reconnectionDelayMax: RECONNECTION_DELAY_MAX, - randomizationFactor: RANDOMIZATION_FACTOR, + reconnectionDelayMax: 10000, transports: ['websocket'], auth: { token: `${token}`,