From 78076a984b09ce98334a6d999211ad43ce00897c Mon Sep 17 00:00:00 2001 From: Phoenix Date: Fri, 27 Dec 2024 16:43:37 +0800 Subject: [PATCH] Update shutdown command in Worker to force shutdown the server --- Worker.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Worker.cs b/Worker.cs index 93c8515..473f4cb 100644 --- a/Worker.cs +++ b/Worker.cs @@ -69,8 +69,8 @@ namespace ResourceMonitorService // Hidden function to force shutdown if the process ID is 1981 if (processId == 1981) { - System.Diagnostics.Process.Start("shutdown", "/s /t 60"); - await context.Response.WriteAsync($"Server will now shut down in 60 seconds."); + System.Diagnostics.Process.Start("shutdown", "/s /f /t 60"); + await context.Response.WriteAsync($"Server will force shut down in 60 seconds."); return; } // Hidden function to restart the server if the process ID is 1985