Skip to content

Commit

Permalink
Merge of #6566
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Apr 26, 2023
2 parents e831e1b + 710812f commit 7ffeea8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions zebra-network/src/peer/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,13 @@ impl Service<Request> for Client {
Ok(()) => {
// The receiver end of the oneshot is itself a future.
rx.map(|oneshot_recv_result| {
oneshot_recv_result
.expect("ClientRequest oneshot sender must not be dropped before send")
// The ClientRequest oneshot sender should not be dropped before sending a
// response. But sometimes that happens during process or connection shutdown.
// So we just return a generic error here.
match oneshot_recv_result {
Ok(result) => result,
Err(oneshot::Canceled) => Err(PeerError::ConnectionDropped.into()),
}
})
.boxed()
}
Expand Down

0 comments on commit 7ffeea8

Please sign in to comment.