mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
cleanup
This commit is contained in:
parent
2797253cc4
commit
382b6c67f4
@ -320,10 +320,7 @@ public static void SendToReady<T>(NetworkIdentity identity, T message, int chann
|
||||
SendToReady(identity, message, true, channelId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disconnect all currently connected clients, including the local connection.
|
||||
/// <para>This can only be called on the server. Clients will receive the Disconnect message.</para>
|
||||
/// </summary>
|
||||
/// <summary>Disconnect all connections, including the local connection.</summary>
|
||||
public static void DisconnectAll()
|
||||
{
|
||||
DisconnectAllConnections();
|
||||
@ -331,10 +328,7 @@ public static void DisconnectAll()
|
||||
active = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disconnect all currently connected clients except the local connection.
|
||||
/// <para>This can only be called on the server. Clients will receive the Disconnect message.</para>
|
||||
/// </summary>
|
||||
/// <summary>Disconnect all currently connected clients except the local connection.</summary>
|
||||
public static void DisconnectAllConnections()
|
||||
{
|
||||
// disconnect and remove all connections.
|
||||
@ -348,7 +342,7 @@ public static void DisconnectAllConnections()
|
||||
// until then, let's copy .Values to avoid InvalidOperatinException.
|
||||
// note that this is only called when stopping the server, so the
|
||||
// copy is no performance problem.
|
||||
foreach (NetworkConnection conn in connections.Values.ToList())
|
||||
foreach (NetworkConnectionToClient conn in connections.Values.ToList())
|
||||
{
|
||||
conn.Disconnect();
|
||||
// call OnDisconnected unless local player in host mode
|
||||
|
Loading…
Reference in New Issue
Block a user