Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't kill a DnsExchangeBackground if a receiver is gone (see #1276) #1356

Merged
merged 1 commit into from Jan 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/proto/src/xfer/dns_exchange.rs
Expand Up @@ -192,14 +192,14 @@ where
// if there is no peer, this connection should die...
let (dns_request, serial_response): (DnsRequest, _) = dns_request.into_parts();

// Try to forward the `DnsResponseFuture` to the requesting task. If we fail,
// it must be because the requesting task has gone away / is no longer
// interested. In that case, we can just log a warning, but there's no need
// to take any more serious measures (such as shutting down this task).
match serial_response.send_response(io_stream.send_message(dns_request)) {
Ok(()) => (),
Err(_) => {
warn!("failed to associate send_message response to the sender");

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably adding comments here to illustrate the situation could be better.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, can you take a look and see if what I added makes sense?

return Poll::Ready(Err(
"failed to associate send_message response to the sender".into(),
));
}
}
}
Expand Down