mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkServerTest: RemoveLocalConnection reuses CreateLocalConnectionPair
This commit is contained in:
parent
133b1eb841
commit
bf6957c150
@ -241,11 +241,8 @@ public void RemoveLocalConnection()
|
||||
NetworkServer.Listen(1);
|
||||
|
||||
// set local connection
|
||||
// local connection needs a server connection because
|
||||
// RemoveLocalConnection calls localConnection.Disconnect
|
||||
LocalConnectionToClient localConnection = new LocalConnectionToClient();
|
||||
localConnection.connectionToServer = new LocalConnectionToServer();
|
||||
NetworkServer.SetLocalConnection(localConnection);
|
||||
CreateLocalConnectionPair(out LocalConnectionToClient connectionToClient, out _);
|
||||
NetworkServer.SetLocalConnection(connectionToClient);
|
||||
|
||||
// remove local connection
|
||||
NetworkServer.RemoveLocalConnection();
|
||||
|
Loading…
Reference in New Issue
Block a user