Skip to content

Commit

Permalink
fit(client): cancel blocking DNS lookup if GaiFuture dropped (#2689)
Browse files Browse the repository at this point in the history
Closes #2686
  • Loading branch information
Ahmed Sobeh authored Nov 8, 2021
1 parent 913be88 commit 174b553
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/client/connect/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ impl fmt::Debug for GaiFuture {
}
}

impl Drop for GaiFuture {
fn drop(&mut self) {
self.inner.abort();
}
}

impl Iterator for GaiAddrs {
type Item = SocketAddr;

Expand Down

0 comments on commit 174b553

Please sign in to comment.