debug connections

This commit is contained in:
Ferdinand Schober
2024-09-16 21:33:25 +02:00
parent 9593b97fbe
commit 3e62739f7e
2 changed files with 6 additions and 1 deletions

View File

@@ -144,9 +144,14 @@ impl LanMouseConnection {
log::warn!("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;
}
tokio::time::sleep(Duration::from_millis(500)).await;
let mut buf = [0u8; MAX_EVENT_SIZE];
conn.recv(&mut buf).await;
}
});
}