From f03f665e083250b9c1721d40556e488b4347293c Mon Sep 17 00:00:00 2001 From: ProjectMoon Date: Tue, 30 Jul 2024 16:03:38 +0200 Subject: [PATCH] Do not kill entire chat window when websocket closes. Reopens the websocket on close. Prevents badly configured reverse proxies from making the application stop working. --- ui/components/ChatWindow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/components/ChatWindow.tsx b/ui/components/ChatWindow.tsx index ea9a93d..34e4114 100644 --- a/ui/components/ChatWindow.tsx +++ b/ui/components/ChatWindow.tsx @@ -194,7 +194,7 @@ const useSocket = ( ws.onclose = () => { clearTimeout(timeoutId); - setError(true); + setWs(null); console.log('[DEBUG] closed'); };