From 4d651c27dd8de1751a983778fd803c17ae13325b Mon Sep 17 00:00:00 2001 From: ynwd <10122431+ynwd@users.noreply.github.com> Date: Sun, 17 Nov 2024 18:17:13 +0700 Subject: [PATCH] chore: update socket --- modules/hook/socket.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hook/socket.ts b/modules/hook/socket.ts index 62606b69..408c611a 100644 --- a/modules/hook/socket.ts +++ b/modules/hook/socket.ts @@ -12,7 +12,7 @@ const useWebSocket = (url: string, room: string, user: string) => { function ping(data: any) { const i = setInterval(() => { if ( - countRef.current > 0 + countRef.current > 1 ) { setIsConnected(true); return clearInterval(i);