fix compilation

This commit is contained in:
Ferdinand Schober
2024-09-21 14:38:33 +02:00
parent 64c4480e93
commit 4bbabf1e0a
3 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,5 @@
use std::{
cell::Cell,
future,
time::{Duration, Instant},
};

View File

@@ -211,7 +211,7 @@ async fn receive_loop(
let mut buf = [0u8; MAX_EVENT_SIZE];
while let Ok(_) = conn.recv(&mut buf).await {
if let Ok(event) = buf.try_into() {
tx.send((handle, event));
tx.send((handle, event)).expect("channel closed");
}
}
}

View File

@@ -92,6 +92,7 @@ impl Server {
let config = Rc::new(config);
Self {
active: Rc::new(Cell::new(None)),
config,
client_manager,
port,