diff --git a/src/server/conn/http2.rs b/src/server/conn/http2.rs index 4f7df823ae..4e685453da 100644 --- a/src/server/conn/http2.rs +++ b/src/server/conn/http2.rs @@ -175,6 +175,17 @@ impl Builder { self } + /// Configures the maximum number of pending reset streams allowed before a GOAWAY will be sent. + /// + /// This will default to the default value set by the [`h2` crate](https://crates.io/crates/h2). + /// As of v0.3.17, it is 20. + /// + /// See for more information. + pub fn max_pending_accept_reset_streams(&mut self, max: impl Into>) -> &mut Self { + self.h2_builder.max_pending_accept_reset_streams = max.into(); + self + } + /// Sets an interval for HTTP2 Ping frames should be sent to keep a /// connection alive. ///