feat: send closed message if the server is closed

This commit is contained in:
CyberL1 2024-05-30 11:01:42 +02:00
parent bf2d2ff641
commit 0669c741b9

View File

@ -2,6 +2,7 @@
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Enums;
using Minecraft_Realms_Emulator.Modes.Realms.Helpers;
namespace Minecraft_Realms_Emulator.Controllers.Admin
@ -55,6 +56,7 @@ namespace Minecraft_Realms_Emulator.Controllers.Admin
await HttpContext.Response.Body.FlushAsync();
});
if (world.State == nameof(StateEnum.CLOSED)) await HttpContext.Response.WriteAsync("data: closed\n\n");
return new EmptyResult();
}