diff --git a/Cargo.toml b/Cargo.toml index 9ec456a..a657420 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,3 +75,4 @@ __internal_happy_eyeballs_tests = [] [[example]] name = "client" required-features = ["client-legacy", "http1", "tokio"] + diff --git a/src/server/conn/auto.rs b/src/server/conn/auto.rs index 7240808..9ddd406 100644 --- a/src/server/conn/auto.rs +++ b/src/server/conn/auto.rs @@ -661,6 +661,17 @@ impl Http2Builder<'_, E> { Http1Builder { inner: self.inner } } + /// 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.4.0, it is 20. + /// + /// See for more information. + pub fn max_pending_accept_reset_streams(&mut self, max: impl Into>) -> &mut Self { + self.inner.http2.max_pending_accept_reset_streams(max); + self + } + /// Sets the [`SETTINGS_INITIAL_WINDOW_SIZE`][spec] option for HTTP2 /// stream-level flow control. ///