File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed
com.unity.netcode.gameobjects
Tests/Runtime/DistributedAuthority Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -757,16 +757,18 @@ protected IEnumerator StartClient(NetworkManager networkManager)
757757 {
758758 // Wait for the new client to connect
759759 yield return WaitForClientsConnectedOrTimeOut ( ) ;
760- AssertOnTimeout ( $ "{ nameof ( StartClient ) } timed out waiting for all clients to be connected!\n { m_InternalErrorLog } ") ;
761-
762- OnNewClientStartedAndConnected ( networkManager ) ;
763760 if ( s_GlobalTimeoutHelper . TimedOut )
764761 {
765762 AddRemoveNetworkManager ( networkManager , false ) ;
766763 Object . DestroyImmediate ( networkManager . gameObject ) ;
764+ AssertOnTimeout ( $ "{ nameof ( CreateAndStartNewClient ) } timed out waiting for the new client to be connected!\n { m_InternalErrorLog } ") ;
765+ yield break ;
766+ }
767+ else
768+ {
769+ OnNewClientStartedAndConnected ( networkManager ) ;
767770 }
768771
769- AssertOnTimeout ( $ "{ nameof ( CreateAndStartNewClient ) } timed out waiting for the new client to be connected!\n { m_InternalErrorLog } ") ;
770772 ClientNetworkManagerPostStart ( networkManager ) ;
771773 if ( networkManager . DistributedAuthorityMode )
772774 {
@@ -1344,13 +1346,6 @@ protected IEnumerator CoroutineShutdownAndCleanUp()
13441346 {
13451347 VerboseDebug ( $ "Entering { nameof ( ShutdownAndCleanUp ) } ") ;
13461348 // Shutdown and clean up both of our NetworkManager instances
1347-
1348- foreach ( var networkManager in m_NetworkManagers )
1349- {
1350- networkManager . Shutdown ( ) ;
1351- }
1352- yield return k_DefaultTickRate ;
1353-
13541349 try
13551350 {
13561351 DeRegisterSceneManagerHandler ( ) ;
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ internal class DistributedAuthorityCodecTests : NetcodeIntegrationTest
5555
5656 private bool m_EnsureVariableLengthSafety ;
5757
58- public DistributedAuthorityCodecTests ( NetworkConfigOptions configOptions )
58+ public DistributedAuthorityCodecTests ( NetworkConfigOptions configOptions ) : base ( )
5959 {
6060 m_EnsureVariableLengthSafety = configOptions == NetworkConfigOptions . EnsureVariableLengthSafety ;
6161 }
You can’t perform that action at this time.
0 commit comments