When trying to use mist websockets across page reloads, guided by the readme example, mist seems to crash due to some issue related to connection.transport.send, but I am not sure why.
Removing the assertion on line mist/internal/websocket.gleam:232:
let assert Ok(_) =
connection.transport.send(
connection.socket,
frame_to_bit_builder(frame),
)
changing to:
let _ =
connection.transport.send(
connection.socket,
frame_to_bit_builder(frame),
)
fixes the issue, however I am not sure that is the correct fix or not. But by removing this assertion, the code is allowed to proceed with gracefully stopping the actor and prevents it from crashing the entire process, putting the website in an unrecoverable state.
When trying to use mist websockets across page reloads, guided by the readme example, mist seems to crash due to some issue related to
connection.transport.send
, but I am not sure why.Removing the assertion on line
mist/internal/websocket.gleam:232
:changing to:
fixes the issue, however I am not sure that is the correct fix or not. But by removing this assertion, the code is allowed to proceed with gracefully stopping the actor and prevents it from crashing the entire process, putting the website in an unrecoverable state.
This issue is reproducible in the following project: https://github.com/bitbldr/mist_ws_crash