diff --git a/Platforms/Server/Endpoints.cs b/Platforms/Server/Endpoints.cs index d51a259..57402d6 100644 --- a/Platforms/Server/Endpoints.cs +++ b/Platforms/Server/Endpoints.cs @@ -11,7 +11,7 @@ using Engine.Systems.Network; namespace Server; -public class Endpoints : Behaviour, IFirstFrameUpdate +public class Endpoints : Behaviour, IFirstFrameUpdate, ILastFrameUpdate { private INetworkCommunicatorServer? server = null!; @@ -36,5 +36,5 @@ public class Endpoints : Behaviour, IFirstFrameUpdate private IResult GetStats() => Results.Json(new { Count = server?.Connections.Count ?? 0 }); public void FirstActiveFrame() => server = Universe.FindRequiredBehaviour(); - protected override void OnExitedUniverse(IUniverse universe) => server = null; + public void LastActiveFrame() => server = null; }