Skip to content

Do not warn if the Disconnected entity was already despawned#49

Merged
aecsocket merged 2 commits intoaecsocket:mainfrom
cBournhonesque:patch-1
Jul 5, 2025
Merged

Do not warn if the Disconnected entity was already despawned#49
aecsocket merged 2 commits intoaecsocket:mainfrom
cBournhonesque:patch-1

Conversation

@cBournhonesque
Copy link
Copy Markdown
Contributor

In some cases I issue some triggers that despawn the Session entity when Disconnected is added, but before this command completes, which results in a warning.
This PR suppresses warnings if the entity was already despawned

@aecsocket
Copy link
Copy Markdown
Owner

This change makes sense to me. I think that since despawn() is an idempotent operation, Bevy shouldn't even warn here, but it is what it is.

Could you also modify aeronet_io/src/server.rs:224 to change the despawn to try_despawn? I'm happy to merge this then

@aecsocket aecsocket merged commit 5884157 into aecsocket:main Jul 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants