1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

fix issue with restarting via web

replace some hard coded string in javascript with localization
break things to fix things
This commit is contained in:
RaidMax
2019-05-17 09:02:09 -05:00
parent 7384f3d1a2
commit f54d59de9d
17 changed files with 134 additions and 129 deletions

View File

@ -2,6 +2,7 @@
using SharedLibraryCore;
using System;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace IW4MAdmin.Application
@ -112,14 +113,19 @@ namespace IW4MAdmin.Application
WebfrontCore.Program.Init(ServerManager, ServerManager.CancellationToken) :
Task.CompletedTask;
// we want to run this one on a manual thread instead of letting the thread pool handle it,
// because we can't exit early from waiting on console input, and it prevents us from restarting
var inputThread = new Thread(async () => await ReadConsoleInput());
inputThread.Start();
var tasks = new[]
{
ServerManager.Start(),
webfrontTask,
ReadConsoleInput(),
};
await Task.WhenAll(tasks);
inputThread.Abort();
ServerManager.Logger.WriteVerbose(Utilities.CurrentLocalization.LocalizationIndex["MANAGER_SHUTDOWN_SUCCESS"]);
}