Remove player when leaving

- Add Clientbound Remove Entities
This commit is contained in:
Snowiiii committed 2024-08-07 18:46:10 +02:00
1 parent 4f06496261
commit 39985246ba
5 files changed
+31 -4

No files matched your search

+1 -1
View File
@@ -138,8 +138,8 @@ fn main() -> io::Result<()> {
};
if done {
if let Some(client) = connections.remove(&token) {
let mut client = client.borrow_mut();
server.remove_client(&token);
let mut client = client.borrow_mut();
poll.registry().deregister(&mut client.connection)?;
}
}