Skip to content

Commit

Permalink
Don't manually attempt to close websocket from frontend
Browse files Browse the repository at this point in the history
There's no need. It gets closed automatically when leaving the page anyway. The reason we haven't been seeing it is that Streamly isn't propagating monadic exceptions properly, which I think is essentially down to composewell/streamly#1203. If we remove the `serverUpdates` stream at line 317, we do see the error handled, and `onDroppedConnection` firing.
  • Loading branch information
georgefst committed Aug 13, 2021
1 parent 4561ba1 commit 95af2c3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ const ws = new WebSocket(wsAddress)

const layouts = JSON.parse(attr("layouts"))

window.onbeforeunload = () => ws.close()

ws.onopen = _event => {
// Elm
elmInitialised = false
Expand Down

0 comments on commit 95af2c3

Please sign in to comment.