Skip to main content

on_ws_close

Function on_ws_close 

Source
pub(super) fn on_ws_close(
    core: &mut ProtocolCore,
    close_code: u16,
) -> Vec<Command>
Expand description

handles websocket closure after a user was already in flight

there are three different cases here and mixing them up is the main way to break reconnect behavior:

example:

Connected --on_ws_close(AuthFailed)--> Closed
Connected --on_ws_close(1011)--> Recovering