Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Reduce websocket closed error level
Browse files Browse the repository at this point in the history
  • Loading branch information
pajowu committed Nov 15, 2024
1 parent 518a5db commit b276924
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/javascript/lib/websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ class Room {
this.trigger(data.type, data)
}
this.socket.onerror = (e) => {
console.error(e)
console.error('websocket error', e)
}
this.socket.onclose = () => {
this.clearHeartbeat()
window.removeEventListener('beforeunload', this.onunload)
if (!this.closed) {
console.error('Socket closed unexpectedly. Retrying...')
console.info('Socket closed unexpectedly. Retrying...')
this.setupRetry()
}
}
Expand Down

0 comments on commit b276924

Please sign in to comment.