Close previous connection

This commit is contained in:
henrik committed 2025-01-10 14:04:09 +01:00
1 parent 81fb8beece
commit 2ae20cdac1
1 file changed
+4
+4
View File
@@ -17,6 +17,10 @@
let debounce: number | null = $state(null);
const connect = () => {
if (ws) {
ws.close();
}
ws = new WebSocket("/ws");
ws.onmessage = (event) => {