1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

only unload plugins once at shutdown

clean up some doc warnings
This commit is contained in:
RaidMax
2022-03-24 11:34:32 -05:00
parent 9e35e12560
commit 1b59941ab2
16 changed files with 69 additions and 42 deletions

View File

@ -77,8 +77,12 @@ namespace IW4MAdmin.Application
/// <param name="e"></param>
private static async void OnCancelKey(object sender, ConsoleCancelEventArgs e)
{
_serverManager?.Stop();
if (_applicationTask != null)
if (_serverManager is not null)
{
await _serverManager.Stop();
}
if (_applicationTask is not null)
{
await _applicationTask;
}
@ -153,8 +157,11 @@ namespace IW4MAdmin.Application
{
Console.WriteLine(e.Message);
}
_serverManager?.Stop();
if (_serverManager is not null)
{
await _serverManager?.Stop();
}
Console.WriteLine(exitMessage);
await Console.In.ReadAsync(new char[1], 0, 1);