Add robust reconnection with mDNS watch and WaitingForServer state#123
Merged
chrisuthe merged 1 commit intochrisuthe:devfrom Jan 29, 2026
Merged
Add robust reconnection with mDNS watch and WaitingForServer state#123chrisuthe merged 1 commit intochrisuthe:devfrom
chrisuthe merged 1 commit intochrisuthe:devfrom
Conversation
- Disable SDK AutoReconnect; app manages reconnection with fresh mDNS discovery and clean player contexts - Map all SDK connection states to app PlayerState enum - Add concurrent reconnection via Task.WhenAll instead of sequential - Add mDNS watch (ServerFound + ServerUpdated) with semaphore signal for immediate reconnection when server reappears - Add WaitingForServer state for mDNS-dependent players that start before a server is available (passive wait, no active retries) - Override transient Error/Stopped states during reconnection to prevent red flash in UI - Switch to local SDK ProjectReference for development Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7 tasks
scyto
added a commit
that referenced
this pull request
Feb 8, 2026
Skip invalid 0ms latency samples during lock-in
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.
Summary
AutoReconnect— The app manages its own reconnection with fresh mDNS discovery and clean player contexts, which handles server address changes better than the SDK's built-in retry-same-URI approach.PlayerState—Connecting,Handshaking,Reconnecting,Disconnected, andDisconnectingnow propagate to the UI instead of being ignored.ServerFound+ServerUpdatedevents) detects server reappearance and triggers immediate concurrent reconnection viaSemaphoreSlimsignal +Task.WhenAll, replacing the old sequential polling loop.WaitingForServerstate for mDNS-dependent startup — Players that start before a server is available enter a passive wait mode (no active retries,NextRetryTime = DateTime.MaxValue) until mDNS discovers a server. UI shows "Waiting for mDNS discovery" badge.Error/Stopped/Starting/Connectingstates withReconnectingorWaitingForServerin the API response to prevent red error flash in UI.Errorstate permanently.Dependency
Test plan
🤖 Generated with Claude Code