This commit is contained in:
Ferdinand Schober
2024-07-14 14:36:36 +02:00
parent a7e7941806
commit 4bac6d4bae

View File

@@ -203,13 +203,13 @@ impl Server {
} }
}, },
_ = self.notifies.dns_request_pending.notified() => { _ = self.notifies.dns_request_pending.notified() => {
let requests = self loop {
.pending_dns_requests let request = self.pending_dns_requests.borrow_mut().pop_front();
.borrow_mut() if let Some(request) = request {
.drain(..)
.collect::<Vec<_>>();
for request in requests {
dns_request.send(request).await.expect("channel closed"); dns_request.send(request).await.expect("channel closed");
} else {
break;
}
} }
} }
_ = self.cancelled() => break, _ = self.cancelled() => break,