Skip to main content

await_close_answer

Function await_close_answer 

Source
pub(super) async fn await_close_answer<S, E>(messages: &mut S)
where S: Stream<Item = Result<Message, E>> + Unpin,
Expand description

Read the client after the close of the server, until it answered the close, for up to CLOSE_TIMEOUT. What it sends meanwhile gets dropped. A socket closed with input it did not read resets the connection, which can drop what the client did not read yet, like the close and the output before it.