mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-31 17:10:54 +03:00
@@ -151,7 +151,15 @@ impl LanMouseConnection {
|
||||
}
|
||||
tokio::time::sleep(Duration::from_millis(500)).await;
|
||||
let mut buf = [0u8; MAX_EVENT_SIZE];
|
||||
conn.recv(&mut buf).await;
|
||||
if let Err(e) = conn.recv(&mut buf).await {
|
||||
log::warn!("recv(): client ({handle}) @ {addr} connection closed: {e}");
|
||||
conns.lock().await.remove(&addr);
|
||||
server.set_active_addr(handle, None);
|
||||
let active: Vec<SocketAddr> =
|
||||
conns.lock().await.keys().copied().collect();
|
||||
log::info!("active connections: {active:?}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user