Skip to content

Commit

Permalink
fix: signal ws
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyzzp committed Jun 20, 2024
1 parent ebbb076 commit 2f39849
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/lib/signal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ export namespace signal {
console.log("signalServer", url)
ws = new WebSocket(url)
ws.onclose = () => {
let state = ws.readyState
ws = null
listeners.forEach(l => {
l.onStatusChanged(ws.readyState)
l.onStatusChanged(state)
})
}
ws.onopen = () => {
Expand Down

0 comments on commit 2f39849

Please sign in to comment.