diff --git a/modules/hook/socket.ts b/modules/hook/socket.ts index 253b38c0..cacfc9cb 100644 --- a/modules/hook/socket.ts +++ b/modules/hook/socket.ts @@ -57,7 +57,7 @@ const useWebSocket = (url: string, room: string, user: string) => { setIsConnected(false); // Attempt to reconnect after a delay - reconnectTimeoutRef.current = setTimeout(() => { + reconnectTimeoutRef.current = setInterval(() => { connectWebSocket(); }, 3000); // Reconnect after 3 seconds };