Use tokio select for polling client socket

This commit is contained in:
Aram 🍐 2021-10-14 19:31:29 -04:00
parent 5ba111002f
commit bf489900e6
2 changed files with 60 additions and 71 deletions

View file

@ -14,9 +14,7 @@ impl PortPool {
pub fn new() -> Self {
let inner = lockfree::queue::Queue::default();
PORT_RANGE.for_each(|p| inner.push(p) as ());
Self {
inner,
}
Self { inner }
}
pub fn next(&self) -> anyhow::Result<u16> {