File tree 2 files changed +7
-12
lines changed
com.unity.netcode.gameobjects
Tests/Runtime/DistributedAuthority
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)
757
757
{
758
758
// Wait for the new client to connect
759
759
yield return WaitForClientsConnectedOrTimeOut ( ) ;
760
- AssertOnTimeout ( $ "{ nameof ( StartClient ) } timed out waiting for all clients to be connected!\n { m_InternalErrorLog } ") ;
761
-
762
- OnNewClientStartedAndConnected ( networkManager ) ;
763
760
if ( s_GlobalTimeoutHelper . TimedOut )
764
761
{
765
762
AddRemoveNetworkManager ( networkManager , false ) ;
766
763
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 ) ;
767
770
}
768
771
769
- AssertOnTimeout ( $ "{ nameof ( CreateAndStartNewClient ) } timed out waiting for the new client to be connected!\n { m_InternalErrorLog } ") ;
770
772
ClientNetworkManagerPostStart ( networkManager ) ;
771
773
if ( networkManager . DistributedAuthorityMode )
772
774
{
@@ -1344,13 +1346,6 @@ protected IEnumerator CoroutineShutdownAndCleanUp()
1344
1346
{
1345
1347
VerboseDebug ( $ "Entering { nameof ( ShutdownAndCleanUp ) } ") ;
1346
1348
// 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
-
1354
1349
try
1355
1350
{
1356
1351
DeRegisterSceneManagerHandler ( ) ;
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ internal class DistributedAuthorityCodecTests : NetcodeIntegrationTest
55
55
56
56
private bool m_EnsureVariableLengthSafety ;
57
57
58
- public DistributedAuthorityCodecTests ( NetworkConfigOptions configOptions )
58
+ public DistributedAuthorityCodecTests ( NetworkConfigOptions configOptions ) : base ( )
59
59
{
60
60
m_EnsureVariableLengthSafety = configOptions == NetworkConfigOptions . EnsureVariableLengthSafety ;
61
61
}
You can’t perform that action at this time.
0 commit comments