mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 18:27:24 +01:00
throw more cancellationtokens around
This commit is contained in:
parent
22e11cac6a
commit
3134b2c7a8
2 changed files with 54 additions and 41 deletions
|
|
@ -607,18 +607,24 @@ public sealed class IpcManager : DisposableMediatorSubscriberBase
|
|||
|
||||
ActionQueue.Enqueue(action);
|
||||
|
||||
if (!fireAndForget)
|
||||
try
|
||||
{
|
||||
var disposeToken = _disposalCts.Token;
|
||||
var combinedToken = CancellationTokenSource.CreateLinkedTokenSource(disposeToken, token).Token;
|
||||
if (!fireAndForget)
|
||||
{
|
||||
var disposeToken = _disposalCts.Token;
|
||||
var combinedToken = CancellationTokenSource.CreateLinkedTokenSource(disposeToken, token).Token;
|
||||
|
||||
await Task.Delay(TimeSpan.FromSeconds(1)).ConfigureAwait(false);
|
||||
|
||||
if (!combinedToken.IsCancellationRequested)
|
||||
await _dalamudUtil.WaitWhileCharacterIsDrawing(logger, obj, applicationId, 30000, combinedToken).ConfigureAwait(false);
|
||||
await Task.Delay(TimeSpan.FromSeconds(1), combinedToken).ConfigureAwait(false);
|
||||
|
||||
if (!combinedToken.IsCancellationRequested)
|
||||
await _dalamudUtil.WaitWhileCharacterIsDrawing(logger, obj, applicationId, 30000, combinedToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_penumbraRedrawRequests[obj.Address] = false;
|
||||
}
|
||||
|
||||
Mediator.Publish(new PenumbraEndRedrawMessage(obj.Address));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue