Skip to content

Commit

Permalink
Don't kill a DnsExchangeBackground if a receiver is gone (see #1276)
Browse files Browse the repository at this point in the history
  • Loading branch information
djc authored and bluejekyll committed Jan 19, 2021
1 parent ec8f839 commit 06e4579
Showing 1 changed file with 4 additions and 4 deletions.
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");

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

0 comments on commit 06e4579

Please sign in to comment.