http2: ReadTimeout timer not resetting?
Keep-Alive connections get closed ReadTimeout seconds after connecting, even if they’re actively being used to make HTTP requests:

I’m using a ReadTimeout of 5 seconds. As you can see, 5 and 10 seconds after the initial request, the browser has to connect again.
I believe this issue is basically the same as this one: https://github.com/golang/go/issues/16450
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 3
- Comments: 16 (10 by maintainers)
Commits related to this issue
- Added test case for #27 — committed to dgrr/http2 by dgrr 2 years ago
Also, when I remove
http2.ConfigureServerAndConfig(server, tlsConfig)so it uses HTTP/1.1, it doesn’t happen.Yes, I’m sure.
Chrome:
Firefox:
The timeout is not working:
Server:
Also:
From: https://httpwg.org/specs/rfc7540.html#n-connection-management
Maybe you’re misunderstanding the problem.
ReadTimeout documentation:
Before v0.2.4, the read deadline was only reset when the connection opened, and now read and write timeouts are disabled completely. The expected behavior is the deadline resetting after the first byte of a HTTP request has been read.
Connections are no longer being closed 5 seconds after connecting, but timeouts don’t work at all now.
I’ll let the issue open here, and create a new one in fasthttp