diff --git a/todoblue/src/app/(api)/useWs.ts b/todoblue/src/app/(api)/useWs.ts index 9b80b82..d6ac4b0 100644 --- a/todoblue/src/app/(api)/useWs.ts +++ b/todoblue/src/app/(api)/useWs.ts @@ -84,7 +84,7 @@ export function useWs(url: string | undefined, {onclose, onerror, onmessage, ono } sock.onclose = (event) => { console.debug("[useWebSocket] Closed connection:", event) - dispatch({event: "stateChange"}) + dispatch({event: "disconnect"}); onclose?.({event, closeWebSocket}); } sock.onerror = (event) => {