Skip to main content

ws_peek_result

Function ws_peek_result 

Source
fn ws_peek_result(
    client: &mut SessionClient,
    is_err: bool,
    msgs: Vec<WebSocketResponse>,
) -> (bool, Vec<WebSocketResponse>, Option<(StatementEndedExecutionReason, ExecuteContextGuard)>)
Expand description

Packages a terminal result of stream_ws_peek_rows, appending any notices still buffered on the session after msgs.

The streaming loop forwards notices live through await_rowsrecv_notice select, but the terminal recv() -> None can race a still-buffered notice and end the loop first. Draining here restores the buffered path’s guarantee that all notices reach the client, after CommandComplete or Error.