-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Http2's SendPingAsync may leak UnobservedTaskExceptions #64450
Comments
Tagging subscribers to this area: @dotnet/ncl Issue Details(based on code inspection) The runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs Line 2041 in 82c45ca
We should consume the task with Should be an easy fix - marking as up for grabs.
|
Hi @MihaZupan, can I take this up? If I understood correct, all that's needed to do is to wrap the function |
That's right. I'll assign the issue to you :) |
Thanks, I have put up a PR regarding this. |
Wrap the SendPingAsync function with LogExceptions in Http2Connection.cs to avoid any exception here being caught as an UnobservedTaskException. Fix #64450 Signed-off-by: Shubhanshu Saxena <[email protected]>
(based on code inspection)
The
SendPingAsync
call that we do as part of theConnectionPoolManager
's heartbeat isn't awaited and so any exceptions from it would bubble up asUnobservedTaskException
s.runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs
Line 2041 in 82c45ca
We should consume the task with
LogExceptions(SendPingAsync(pingPayload))
as we do when sending out pings normally.Should be an easy fix - marking as up for grabs.
The text was updated successfully, but these errors were encountered: