Skip to content

fix: Restarting UnityTransport after it failed to start [MTT-3452] #2220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 27, 2022

Conversation

simon-lemay-unity
Copy link
Contributor

Fixes #1924. The issue was that we shut down the transport when it failed to be started, which disposed of the network settings. So when restarting the transport, there would be errors when configuring the settings. The fix was to not shut down when failing to start. The start process only ends up creating the network driver, so to revert to the state before we started, we just need to dispose of the driver.

Changelog

Testing and Documentation

  • Includes unit test.
  • No documentation changes or additions were necessary.

@simon-lemay-unity simon-lemay-unity requested review from a team as code owners September 27, 2022 18:04
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@simon-lemay-unity simon-lemay-unity merged commit 96025ac into develop Sep 27, 2022
@simon-lemay-unity simon-lemay-unity deleted the fix/transport-restart-after-failure branch September 27, 2022 19:53
jakobbbb pushed a commit to GooseGirlGames/com.unity.netcode.gameobjects that referenced this pull request Feb 22, 2023
…nity-Technologies#2220)

* Add test for transport restart failure

* Fix restart after transport failure

* Add CHANGELOG entry

* Add PR number to CHANGELOG entry
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.

When NetworkManager.StartHost() is called with invalid ConnectionData in Unity Transport, the NetworkManager is irrecoverably shutdown
3 participants