If the server doesn't respond to our pings in time, we'll currently throw a protocol exception
|
case KeepAliveState.PingSent: |
|
if (now > _keepAlivePingTimeoutTimestamp) |
|
ThrowProtocolError(); |
with the exception looking something like this
The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError)
---> System.Net.Http.HttpProtocolException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError)
at System.Net.Http.Http2Connection.ThrowProtocolError(Http2ProtocolErrorCode errorCode, String message)
at System.Net.Http.Http2Connection.VerifyKeepAlive()
at System.Net.Http.Http2Connection.HeartBeat()
which is misleading since the server didn't send us invalid data, we just didn't hear back from it in time.
We should add a useful exception message for this case.
If the server doesn't respond to our pings in time, we'll currently throw a protocol exception
runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs
Lines 2137 to 2139 in 7fdc74e
with the exception looking something like this
which is misleading since the server didn't send us invalid data, we just didn't hear back from it in time.
We should add a useful exception message for this case.