Skip to content

fix(server): install timer for HTTP/2 connections - #1644

Open
mindrunner wants to merge 1 commit into
paritytech:masterfrom
mindrunner:fix-hyper-server-timer
Open

fix(server): install timer for HTTP/2 connections#1644
mindrunner wants to merge 1 commit into
paritytech:masterfrom
mindrunner:fix-hyper-server-timer

Conversation

@mindrunner

Copy link
Copy Markdown

Summary

  • Install TokioTimer on the server HTTP/2 builder used by accepted connections.
  • Install TokioTimer on the low-level serve and serve_with_graceful_shutdown helpers.

Context

Hyper 1.x requires an explicit timer for HTTP/2 keep-alive / timeout handling. jsonrpsee exposes server keep-alive configuration via ServerConfigBuilder::set_keep_alive, but the underlying hyper_util::server::conn::auto::Builder is currently created with only TokioExecutor.

That means a server configured with HTTP/2 keep-alive can panic at runtime when an HTTP/2 connection constructs hyper's ping channel:

You must supply a timer.

This mirrors the timer setup tonic added for its hyper-backed server path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant