Skip to content

Commit 174b553

Browse files
author
Ahmed Sobeh
authored
fit(client): cancel blocking DNS lookup if GaiFuture dropped (#2689)
Closes #2686
1 parent 913be88 commit 174b553

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/client/connect/dns.rs

+6
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ impl fmt::Debug for GaiFuture {
159159
}
160160
}
161161

162+
impl Drop for GaiFuture {
163+
fn drop(&mut self) {
164+
self.inner.abort();
165+
}
166+
}
167+
162168
impl Iterator for GaiAddrs {
163169
type Item = SocketAddr;
164170

0 commit comments

Comments
 (0)