implement feedback from issue #91 when sv_running is off

clean up a trying to abort thread which doesn't actually work with .net core
don't log event tasks cancelled as error, because it's not
This commit is contained in:
RaidMax
2020-01-13 16:51:16 -06:00
parent 639db5d7eb
commit cd387ca08b
7 changed files with 30 additions and 8 deletions

View File

@ -257,13 +257,16 @@ namespace SharedLibraryCore
{
processed = await Task.Run(() => _eventFinishedWaiter.WaitOne(timeSpan), token);
}
catch { }
catch (TaskCanceledException)
{
processed = true;
}
if (!processed)
{
#if DEBUG
//throw new Exception();
throw new Exception();
#endif
Owner?.Logger.WriteError("Waiting for event to complete timed out");
Owner?.Logger.WriteDebug($"{Id}, {Type}, {Data}, {Extra}, {FailReason.ToString()}, {Message}, {Origin}, {Target}");