mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00: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);
|
NetworkServer.Listen(1);
|
||||||
|
|
||||||
// set local connection
|
// set local connection
|
||||||
// local connection needs a server connection because
|
CreateLocalConnectionPair(out LocalConnectionToClient connectionToClient, out _);
|
||||||
// RemoveLocalConnection calls localConnection.Disconnect
|
NetworkServer.SetLocalConnection(connectionToClient);
|
||||||
LocalConnectionToClient localConnection = new LocalConnectionToClient();
|
|
||||||
localConnection.connectionToServer = new LocalConnectionToServer();
|
|
||||||
NetworkServer.SetLocalConnection(localConnection);
|
|
||||||
|
|
||||||
// remove local connection
|
// remove local connection
|
||||||
NetworkServer.RemoveLocalConnection();
|
NetworkServer.RemoveLocalConnection();
|
||||||
|
Loading…
Reference in New Issue
Block a user