mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-17 09:41:28 +03:00
simplify
This commit is contained in:
@@ -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(..)
|
dns_request.send(request).await.expect("channel closed");
|
||||||
.collect::<Vec<_>>();
|
} else {
|
||||||
for request in requests {
|
break;
|
||||||
dns_request.send(request).await.expect("channel closed");
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ = self.cancelled() => break,
|
_ = self.cancelled() => break,
|
||||||
|
|||||||
Reference in New Issue
Block a user