Repository navigation
Co-op: handle a dropped peer on the session tick, not the transport thread - #51
Merged
codingncaffeine merged 1 commit intoNov 9, 2026
Merged
Conversation
…hread The LAN keepalive (and EOS callbacks) raise PeerDisconnected from a pool thread. MpSession ran OnPeerGone there, so OnPlayerLeft removed the remote avatar from RenderHost._actors while the render loop enumerated it: the host crashed with "Collection was modified" when a client timed out. The session now queues the leave and drains it at the start of Tick. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #36 (one fix per PR, as suggested there).
Co-op: a dropped peer no longer crashes the host. The LAN keepalive (and EOS callbacks) raise
PeerDisconnectedon their own thread;OnPlayerLeftthen removed the remote avatar from_actorswhile the render loop enumerated it (Collection was modified).MpSessionnow queues leaves and drains them at the start ofTick, on the thread that ticks the session.NetSelfTestticks the host after its two disconnects (in-region and staging).Checks: rebased on
main(bef1f38);dotnet build SiegeFX.sln -c Release -warnaserrorclean;dotnet testpasses (newMpDisconnectTests);SiegeFX --selftest-net: ALL PASS. Play-tested: a client timing out no longer takes the host down.🤖 Generated with Claude Code