Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Microsoft.Owin.Testing/OwinClientHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ protected override async Task<HttpResponseMessage> SendAsync(
registration.Dispose();
state.Dispose();
}
});
}, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the Task.Factory call inside RequestState.CompleteResponse() also be updated to use TaskScheduler.Default?

Copy link
Copy Markdown
Author

@kalbert312 kalbert312 Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the issue is specific to StartNew with async callbacks, but not certain.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some test debug runs on the minimal repo example. Could not get the non-async delegate usage of StartNew to not run. 😕


return await state.ResponseTask;
return await state.ResponseTask.ConfigureAwait(false);
}

private class RequestState : IDisposable
Expand Down