Skip to content

Commit

Permalink
Do not panic on broken pipe, it is expected
Browse files Browse the repository at this point in the history
  • Loading branch information
AOx0 committed Dec 3, 2024
1 parent f23912d commit fba4f95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firewall/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ async fn emit_to_suscriber(
match SinkExt::send(&mut s, event).await {
Ok(_) => continue,
Err(e) => match *e {
bincode::ErrorKind::Io(ref e) if e.kind() == ErrorKind::UnexpectedEof => {
log::info!("Channel closed normally (EOF)");
bincode::ErrorKind::Io(ref e) if e.kind() == ErrorKind::UnexpectedEof || e.kind() == ErrorKind::BrokenPipe => {
log::info!("Channel closed normally (EOF/broken pipe)");
break;
}
_ => {
Expand Down

0 comments on commit fba4f95

Please sign in to comment.