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:
@ -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);
|
||||
|
Reference in New Issue
Block a user