From f0d885276988a839ae9283d29caa2b6b063f2858 Mon Sep 17 00:00:00 2001 From: Miha Zupan Date: Thu, 20 Jun 2024 20:33:43 +0200 Subject: [PATCH] Remove debug asserts --- .../src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs index 2208a6265c97d3..ed3e2f50bef1eb 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs @@ -497,7 +497,6 @@ public async Task SendAsync(HttpRequestMessage request, boo { Debug.Assert(_currentRequest == null, $"Expected null {nameof(_currentRequest)}."); Debug.Assert(_readBuffer.ActiveLength == 0, "Unexpected data in read buffer"); - Debug.Assert(_readAheadTaskStatus != ReadAheadTask_Started); MarkConnectionAsNotIdle(); @@ -570,7 +569,6 @@ public async Task 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); // 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