diff --git a/RiptideNetworking/RiptideNetworking/Server.cs b/RiptideNetworking/RiptideNetworking/Server.cs index d8a9fdfc..b7024cb4 100644 --- a/RiptideNetworking/RiptideNetworking/Server.cs +++ b/RiptideNetworking/RiptideNetworking/Server.cs @@ -468,9 +468,7 @@ public void Stop() return; pendingConnections.Clear(); - byte[] disconnectBytes = { (byte)MessageHeader.Disconnect, (byte)DisconnectReason.ServerStopped }; - foreach (Connection client in clients.Values) - client.Send(disconnectBytes, disconnectBytes.Length); + SendToAll(Message.Create(MessageHeader.Disconnect).AddByte((byte)DisconnectReason.ServerStopped)); clients.Clear(); transport.Shutdown();