diff options
| author | mat <git@matdoes.dev> | 2024-12-25 07:27:09 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-12-25 07:27:09 +0000 |
| commit | 8f0d0d92808286e92b7c8aea704be3c00f5afce4 (patch) | |
| tree | fd3809cff3ae64f96fc75f54addb38306fbe77af /azalea-client | |
| parent | 04eaa5c3d01a8f3a599a3a1abf7205eed80df4a2 (diff) | |
| download | azalea-drasl-8f0d0d92808286e92b7c8aea704be3c00f5afce4.tar.xz | |
close tcp connection on bot disconnect and add swarms to testbot cli
Diffstat (limited to 'azalea-client')
| -rw-r--r-- | azalea-client/src/disconnect.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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::<JoinedClientBundle>() + // this makes it close the tcp connection + .remove::<RawConnection>() // swarm detects when this tx gets dropped to fire SwarmEvent::Disconnect .remove::<LocalPlayerEvents>(); + // note that we don't remove the client from the ECS, so if they decide + // to reconnect they'll keep their state } } |
