slight adjustments and fixes
This commit is contained in:
@@ -103,10 +103,19 @@ public sealed class DtrEntry : IDisposable, IHostedService
|
||||
|
||||
public async Task StopAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await _cancellationTokenSource.CancelAsync().ConfigureAwait(false);
|
||||
_cancellationTokenSource.Cancel();
|
||||
|
||||
if (_dalamudUtilService.IsOnFrameworkThread)
|
||||
{
|
||||
_logger.LogDebug("Skipping Lightfinder DTR wait on framework thread during shutdown.");
|
||||
_cancellationTokenSource.Dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await _runTask!.ConfigureAwait(false);
|
||||
if (_runTask != null)
|
||||
await _runTask.ConfigureAwait(false);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user