Skip to main content

handle_recovery_timer

Function handle_recovery_timer 

Source
pub(super) fn handle_recovery_timer(core: &mut ProtocolCore) -> Vec<Command>
Expand description

retries the saved websocket connection after a recovery delay

this is narrow only ConnectionState::Recovering may consume the recovery timer a stale timer firing after a successful reconnect or explicit disconnect must do nothing, otherwise old scheduled work can restart an inactive attempt

example:

Connected --on_ws_close(1011)--> Recovering
Recovering --handle_recovery_timer()--> Connecting
Connected --handle_recovery_timer()--> no-op