mirror of
https://github.com/Steffo99/todocolors.git
synced 2024-11-22 00:04:18 +00:00
Fix useWs not reconnecting after an error
This commit is contained in:
parent
e8d16b34ca
commit
9c6b9f9b3d
1 changed files with 1 additions and 1 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue