Skip to content

fix: networkmanager cannot be started within OnClientStopped or OnServerStopped callbacks#3908

Open
NoelStephensUnity wants to merge 2 commits intodevelop-2.0.0from
fix/networkmanager-start-from-onstopped
Open

fix: networkmanager cannot be started within OnClientStopped or OnServerStopped callbacks#3908
NoelStephensUnity wants to merge 2 commits intodevelop-2.0.0from
fix/networkmanager-start-from-onstopped

Conversation

@NoelStephensUnity
Copy link
Member

Purpose of this PR

Based on a user submitted issue, adding the ability to start NetworkManager from within NetworkManager.OnClientStopped or NetworkManager.OnServerStopped.

If a host starts itself within the NetworkManager.OnClientStopped, then it will skip invoking the NetworkManager.OnServerStopped since it will have already been started again.

Jira ticket

Needed: wip

Changelog

  • Fixed: If a user starts NetworkManager from within one of its stopped callbacks at the end of shutdown it will fail to start properly.

Documentation

  • Includes edits to existing public API documentation. (wip)

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • Manual testing done

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Backports

No backport. This will be v2.x specific.

Fixing the issue where users might try to start NetworkManager within OnClientStopped or OnServerStopped which would result in a failed start.
Adding test that verifies a NetworkManager can be started when OnClientStopped is invoked and that OnServerStopped is not invoked if the NetworkManager is started again during an OnClientStopped invocation (i.e. host).
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner March 19, 2026 00:16
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