Skip to main content

next_frame

Function next_frame 

Source
async fn next_frame(old: &mut Option<WsHalf>) -> Option<Result<Message, Error>>
Expand description

Await a frame on old if present, else never resolve. Lets the cutover socket’s read half participate in the same tokio::select! as primary’s without needing a separate task — mirrors how discord/gateway.rs boxes an optional sleep future for its heartbeat.