fix: properly prevent deadlock on container cleanup

`ecs` was being locked once in find_entities, and another time when
`ContainerRef::close()` called by the garbage collector from table.set.
This commit is contained in:
2025-02-28 23:13:26 -05:00
parent 88141d74e7
commit 2fee108f62
2 changed files with 27 additions and 22 deletions

View File

@@ -14,8 +14,6 @@ use tokio::net::TcpListener;
#[allow(clippy::too_many_lines)]
pub async fn handle_event(client: Client, event: Event, state: State) -> anyhow::Result<()> {
state.lua.gc_stop();
match event {
Event::AddPlayer(player_info) => {
call_listeners(&state, "add_player", Player::from(player_info)).await;