Skip to content

Commit

Permalink
Fix UnobservedTaskException on Http2's SendPingAsync (#64494)
Browse files Browse the repository at this point in the history
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 <shubhanshu.e01@gmail.com>
  • Loading branch information
shubhanshu02 committed Jan 30, 2022
1 parent c12bea8 commit ce15dc7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2038,7 +2038,7 @@ private void VerifyKeepAlive()
_keepAlivePingTimeoutTimestamp = now + _keepAlivePingTimeout;

long pingPayload = Interlocked.Increment(ref _keepAlivePingPayload);
SendPingAsync(pingPayload);
LogExceptions(SendPingAsync(pingPayload));
return;
}
break;
Expand Down

0 comments on commit ce15dc7

Please sign in to comment.