Function massa_bootstrap::listener::drain_accept
source ยท fn drain_accept<S>(accept: impl FnMut() -> Result<S>, out: &mut Vec<S>)Expand description
Drain all currently-ready connections from accept into out.
The drain ends on the first error, whether it is WouldBlock (no more
pending connections) or any other error such as a persistent EMFILE /
ENFILE. Ending the drain on a non-WouldBlock error (instead of
continue-ing) is what prevents a sticky listener-level failure from
spinning poll() forever and starving the STOP_LISTENER token.