Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readAheadTask asserts in HttpConnection #104496

Merged
merged 1 commit into from
Jul 6, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, boo
// meaning that PrepareForReuse would have failed, and we wouldn't have called SendAsync.
// The task therefore shouldn't be 'default', as it's representing an async operation that had to yield at some point.
Debug.Assert(_readAheadTask != default);
Debug.Assert(_readAheadTaskStatus == ReadAheadTask_CompletionReserved);
Debug.Assert(_readAheadTaskStatus is ReadAheadTask_CompletionReserved or ReadAheadTask_Completed);

// Handle the pre-emptive read. For the async==false case, hopefully the read has
// already completed and this will be a nop, but if it hasn't, the caller will be forced to block
Expand Down Expand Up @@ -852,7 +852,7 @@ public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, boo

if (_readAheadTask != default)
{
Debug.Assert(_readAheadTaskStatus == ReadAheadTask_CompletionReserved);
Debug.Assert(_readAheadTaskStatus is ReadAheadTask_CompletionReserved or ReadAheadTask_Completed);

LogExceptions(_readAheadTask.AsTask());
}
Expand Down
Loading