mirror of
https://github.com/AbaTekNTNU/followspot-psn.git
synced 2025-12-06 13:54:58 +00:00
Close previous connection
This commit is contained in:
@@ -17,6 +17,10 @@
|
|||||||
let debounce: number | null = $state(null);
|
let debounce: number | null = $state(null);
|
||||||
|
|
||||||
const connect = () => {
|
const connect = () => {
|
||||||
|
if (ws) {
|
||||||
|
ws.close();
|
||||||
|
}
|
||||||
|
|
||||||
ws = new WebSocket("/ws");
|
ws = new WebSocket("/ws");
|
||||||
|
|
||||||
ws.onmessage = (event) => {
|
ws.onmessage = (event) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user