diff --git a/ui/components/ChatWindow.tsx b/ui/components/ChatWindow.tsx index ed3594c..a44c550 100644 --- a/ui/components/ChatWindow.tsx +++ b/ui/components/ChatWindow.tsx @@ -237,8 +237,11 @@ const useSocket = ( const interval = setInterval(() => { if (ws.readyState === 1) { setIsWSReady(true); - retryCountRef.current = 0; setError(false); + if (retryCountRef.current > 0) { + toast.success('Connection restored.'); + } + retryCountRef.current = 0; clearInterval(interval); } }, 5);