Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hyperactor/src/channel/net/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@ async fn run<M: RemoteMessage>(
// TODO(T233029051): Return reason through return_channel too.
reason: _,
} => {
// Close the channel to prevent any further messages from being sent.
receiver.close();
// Return in order from oldest to newest, messages
// either not acknowledged or not sent.
unacked
Expand All @@ -584,9 +586,7 @@ async fn run<M: RemoteMessage>(
.chain(outbox.deque.drain(..))
.for_each(|queued| queued.try_return());
while let Ok((msg, return_channel, _)) = receiver.try_recv() {
if let Err(m) = return_channel.send(SendError(ChannelError::Closed, msg)) {
tracing::warn!("failed to deliver SendError: {}", m);
}
let _ = return_channel.send(SendError(ChannelError::Closed, msg));
}
}
_ => (),
Expand Down