Fixed Windows OS exception on async cancel.
Specifically, ObjectDisposedException: Safe handle has been closed.
This commit is contained in:
parent
78e9e185c2
commit
a6f4d918cb
@ -110,9 +110,9 @@ namespace GameServiceWarden.Core.Games
|
||||
if (!running) throw new InvalidOperationException("Service instance not running.");
|
||||
Logger.Log($"\"{ServiceName}\" is stopping.");
|
||||
service.ElegantShutdown();
|
||||
stopToken.Cancel();
|
||||
logSender.Close();
|
||||
logReceiver.Close();
|
||||
stopToken.Cancel();
|
||||
try
|
||||
{
|
||||
if (!acceptingTask.Wait(TIMEOUT)) {
|
||||
|
Reference in New Issue
Block a user