Handle premature request cancellation during workflow resumption
- Use `CancellationToken.None` to avoid canceling workflow execution when clients, like Blazor, terminate requests prematurely. - Add comments for clarification on potential causes.
This commit is contained in:
parent
f2d3c540ee
commit
5fb25170cf
|
|
@ -38,7 +38,11 @@ internal class Resume(ITokenService tokenService, IWorkflowResumer workflowResum
|
|||
return;
|
||||
}
|
||||
|
||||
await ResumeBookmarkedWorkflowAsync(payload, input, asynchronous, cancellationToken);
|
||||
// Some clients, like Blazor, may prematurely cancel their request upon navigation away from the page.
|
||||
// In this case, we don't want to cancel the workflow execution.
|
||||
// We need to better understand the conditions that cause this.
|
||||
var workflowCancellationToken = CancellationToken.None;
|
||||
await ResumeBookmarkedWorkflowAsync(payload, input, asynchronous, workflowCancellationToken);
|
||||
|
||||
if (!HttpContext.Response.HasStarted)
|
||||
await SendOkAsync(cancellationToken);
|
||||
|
|
|
|||
Loading…
Reference in a new issue