Skip to content

Commit

Permalink
fix: end client rx upon disconnection error (#305)
Browse files Browse the repository at this point in the history
Co-authored-by: Rui Fu <[email protected]>
  • Loading branch information
rliang and freeznet authored Mar 14, 2024
1 parent f51c9ea commit a633e70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/consumer/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ impl<Exe: Executor> ConsumerEngine<Exe> {
let r = event_tx.send(mapper(Some(msg))).await;
if let Err(err) = r {
log::error!("Error sending event to channel - {err}");
if err.is_disconnected() {
break;
}
}
}
let send_end_res = event_tx.send(mapper(None)).await;
Expand Down

0 comments on commit a633e70

Please sign in to comment.