From b4f750ff4b6a9e516422aa21ac606165bc24020f Mon Sep 17 00:00:00 2001 From: Badre BSAILA <54767641+pedrobsaila@users.noreply.github.com> Date: Thu, 13 Jun 2024 02:23:13 +0200 Subject: [PATCH] HttpIOException when establishing connection, unobserved task exception (#102960) * HttpIOException when establishing connection, unobserved task exception * do not eagerly allocate InitialSettingsReceived * Update src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs --------- Co-authored-by: Miha Zupan --- .../src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs index 74b6fc84c3256b..aec467cf2c740e 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs @@ -503,6 +503,7 @@ private async Task ProcessIncomingFramesAsync() catch (Exception e) { InitialSettingsReceived.TrySetException(new HttpIOException(HttpRequestError.InvalidResponse, SR.net_http_http2_connection_not_established, e)); + LogExceptions(InitialSettingsReceived.Task); throw new HttpIOException(HttpRequestError.InvalidResponse, SR.net_http_http2_connection_not_established, e); }