From 8f0d0d92808286e92b7c8aea704be3c00f5afce4 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 25 Dec 2024 07:27:09 +0000 Subject: close tcp connection on bot disconnect and add swarms to testbot cli --- azalea-client/src/disconnect.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'azalea-client/src') diff --git a/azalea-client/src/disconnect.rs b/azalea-client/src/disconnect.rs index ea8479d3..37bb37dd 100644 --- a/azalea-client/src/disconnect.rs +++ b/azalea-client/src/disconnect.rs @@ -48,8 +48,12 @@ pub fn remove_components_from_disconnected_players( commands .entity(*entity) .remove::() + // this makes it close the tcp connection + .remove::() // swarm detects when this tx gets dropped to fire SwarmEvent::Disconnect .remove::(); + // note that we don't remove the client from the ECS, so if they decide + // to reconnect they'll keep their state } } -- cgit v1.2.3