Skip to content

Commit c2b1a7e

Browse files
fix
Resetting the NetworkClient upon shutdown.
1 parent 2dc3a3c commit c2b1a7e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,8 +1512,10 @@ internal void Shutdown()
15121512
}
15131513
}
15141514

1515-
LocalClient.IsApproved = false;
1516-
LocalClient.IsConnected = false;
1515+
// Completely clear out the NetworkClient to default settings
1516+
LocalClient = new NetworkClient();
1517+
1518+
// Clear all lists
15171519
ConnectedClients.Clear();
15181520
ConnectedClientIds.Clear();
15191521
ConnectedClientsList.Clear();

0 commit comments

Comments
 (0)