Skip to content

fix: networkmanager starts when transport does not #1780

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

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Mar 7, 2022

When the NetworkTransport.StartServer returns false, we need to stop the startup process for both the StartHost or StartServer methods in NetworkManager. Otherwise there are failure to bind error messages and the server or host still thinks it is started.
MTT-2598

Changelog

com.unity.netcode.gameobjects

-Fixed: issue where NetworkManager would continue starting if the NetworkTransport selected failed.

Testing and Documentation

  • Includes integration tests.

This fixes the issue where if the Transport failed to start the NetworkManager would continue starting.
additional validations to assure the appropriate NetworkManager(s) are not started after Transport failure detected.
removing override not being used.
@NoelStephensUnity NoelStephensUnity requested a review from 0xFA11 March 7, 2022 19:40
NoelStephensUnity and others added 6 commits March 7, 2022 16:12
whitespace fix
merge issue with changelog
Need to assign a newly constructed ArraySegment for the FailedTransport.
IsServer = true;
IsClient = false;
IsListening = true;
var result = NetworkConfig.NetworkTransport.StartServer();
Copy link
Contributor

Choose a reason for hiding this comment

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

can we just kill result local variable entirely? (also below as well)
and turn if checks into if (NetworkConfig.NetworkTransport.StartServer() == false) etc.?

Copy link
Contributor

@0xFA11 0xFA11 left a comment

Choose a reason for hiding this comment

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

minor suggestions but looks good otherwise

NoelStephensUnity and others added 3 commits March 9, 2022 15:54
Co-authored-by: Fatih Mar <mfatihmar@gmail.com>
This includes Fatih's suggestion to remove the transport returned Boolean variable.
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) March 9, 2022 22:02
@NoelStephensUnity NoelStephensUnity merged commit 71b76cc into develop Mar 9, 2022
@NoelStephensUnity NoelStephensUnity deleted the fix/mtt-2598-networkmanager-starts-when-transport-does-not branch March 9, 2022 22:37
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.

3 participants