1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 18:11:04 +09:00

Update readAheadTask asserts (#104496)

This commit is contained in:
Miha Zupan 2024-07-06 04:45:32 +02:00 committed by GitHub
parent aee78d306a
commit a7efcd9ca9
Signed by: github
GPG key ID: B5690EEEBB952194

View file

@ -607,7 +607,7 @@ namespace System.Net.Http
// 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
@ -852,7 +852,7 @@ namespace System.Net.Http
if (_readAheadTask != default)
{
Debug.Assert(_readAheadTaskStatus == ReadAheadTask_CompletionReserved);
Debug.Assert(_readAheadTaskStatus is ReadAheadTask_CompletionReserved or ReadAheadTask_Completed);
LogExceptions(_readAheadTask.AsTask());
}