-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-System.Net.Httpbughelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
Milestone
Description
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
| 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.
wfurt
Metadata
Metadata
Assignees
Labels
area-System.Net.Httpbughelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors