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);