fn is_connection_error(e: &io::Error) -> bool {
            matches!(e.kind(),
                | io::ErrorKind::ConnectionRefused
                | io::ErrorKind::ConnectionAborted
                | io::ErrorKind::ConnectionReset)
        }
/// This function defines per-connection errors: errors that affect only
/// a single connection's accept() and don't imply anything about the
/// success probability of the next accept(). Thus, we can attempt to
/// `accept()` another connection immediately. All other errors will
/// incur a delay before the next `accept()` is performed. The delay is
/// useful to handle resource exhaustion errors like ENFILE and EMFILE.
/// Otherwise, could enter into tight loop.
This function defines per-connection errors: errors that affect only
a single connection's accept() and don't imply anything about the
success probability of the next accept(). Thus, we can attempt to
`accept()` another connection immediately. All other errors will
incur a delay before the next `accept()` is performed. The delay is
useful to handle resource exhaustion errors like ENFILE and EMFILE.
Otherwise, could enter into tight loop.
This function defines per - connection errors : errors that affect only a single connection ' s accept () and don ' t imply anything about the success probability of the next accept () . Thus we can attempt to ` accept () ` another connection immediately . All other errors will incur a delay before the next ` accept () ` is performed . The delay is useful to handle resource exhaustion errors like ENFILE and EMFILE . Otherwise could enter into tight loop .
fn is_connection_error(e: &io::Error) -> bool {
            matches!(e.kind(),
                | io::ErrorKind::ConnectionRefused
                | io::ErrorKind::ConnectionAborted
                | io::ErrorKind::ConnectionReset)
        }
fn is_connection_error ( e : & io :: Error ) -> bool { matches ! ( e kind ( ) io ErrorKind ConnectionRefused io ErrorKind ConnectionAborted io ErrorKind ConnectionReset ) }
This function defines per-connection errors: errors that affect only
a single connection's accept() and don't imply anything about the
success probability of the next accept().
This function defines per - connection errors : errors that affect only a single connection ' s accept () and don ' t imply anything about the success probability of the next accept () .
e
&io::Error
e
&io::Error