Skip to content

Fix host initialization and reconnect lifecycle#6

Open
uz0r wants to merge 3 commits into
PurrNet:mainfrom
uz0r:fix/purrnet-voice-lifecycle
Open

Fix host initialization and reconnect lifecycle#6
uz0r wants to merge 3 commits into
PurrNet:mainfrom
uz0r:fix/purrnet-voice-lifecycle

Conversation

@uz0r

@uz0r uz0r commented Jul 15, 2026

Copy link
Copy Markdown

Summary

Fixes several lifecycle issues in the PurrNet Dissonance adapter:

  • Prevents a host client from being registered with PurrNet's transient Server player ID.
  • Starts voice from PurrNet lifecycle events with state catch-up, so initialization does not depend on Unity component order.
  • Use PurrNet's ShouldStart predicate for consistent editor, clone, build, and disabled-flag behavior.
  • Removes departed clients from the Dissonance server and clears queued packets on session transitions, fixing reconnect failures caused by stale peers or session IDs.
  • Keeps the Dissonance server alive when only a host's local client disconnects.
  • Adds startServerAsHost for the opt-in server-to-host promotion flow; normal role selection follows PurrNet's planned or actual host role.
  • Replaces Unity's deprecated FindObjectOfType usage.

Validation

Tested in Unity 6000.4 Multiplayer Play Mode 2.0.2 with PurrNet v1.20.0-beta.249 and Dissonance 9.0.9:
host/client connection, disconnect, reconnect, and server-to-host promotion.

Standalone and headless dedicated-server builds still need explicit validation.

Full notes can be checked here https://github.com/uz0r/PurrNet-Dissonance/blob/docs/fork-changes/ADAPTER-REFACTOR-NOTES.md


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

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.

1 participant