/// Returns true if other end disconnected, false otherwise
Returns true if other end disconnected, false otherwise
Returns true if other end disconnected false otherwise
fn check_for_exitstat_errors(logger: &slog::Logger, receiver: &Receiver<Error>) -> bool {
    // Print an error but don't exit on bpf issues. Do this b/c we can't always
    // be sure what kind of kernel we're running on and if it's new enough.
    match receiver.try_recv() {
        Ok(e) => error!(logger, "{}", e),
        Err(TryRecvError::Empty) => (),
        Err(TryRecvError::Disconnected) => {
            warn!(logger, "bpf error channel disconnected");
            return true;
        }
    };
    false
}
fn check_for_exitstat_errors ( logger : & slog :: Logger , receiver : & Receiver < Error > ) -> bool { // Print an error but don't exit on bpf issues. Do this b/c we can't always // be sure what kind of kernel we're running on and if it's new enough. match receiver . try_recv ( ) { Ok ( e ) => error ! ( logger " " e ) , Err ( TryRecvError :: Empty ) => ( ) , Err ( TryRecvError :: Disconnected ) => { warn ! ( logger " " ) ; return true ; } } ; false }
Returns true if other end disconnected, false otherwise
Returns true if other end disconnected false otherwise
logger
&slog::Logger
receiver
&Receiver<Error>