Skip to content

Commit 5688b27

Browse files
authored
feat: adds max_pending_accept_reset_streams for legacy (#102)
1 parent a77d866 commit 5688b27

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/client/legacy/client.rs

+16
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,22 @@ impl Builder {
12881288
self
12891289
}
12901290

1291+
/// Configures the maximum number of pending reset streams allowed before a GOAWAY will be sent.
1292+
///
1293+
/// This will default to the default value set by the [`h2` crate](https://crates.io/crates/h2).
1294+
/// As of v0.4.0, it is 20.
1295+
///
1296+
/// See <https://github.com/hyperium/hyper/issues/2877> for more information.
1297+
#[cfg(feature = "http2")]
1298+
#[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
1299+
pub fn http2_max_pending_accept_reset_streams(
1300+
&mut self,
1301+
max: impl Into<Option<usize>>,
1302+
) -> &mut Self {
1303+
self.h2_builder.max_pending_accept_reset_streams(max.into());
1304+
self
1305+
}
1306+
12911307
/// Sets the [`SETTINGS_INITIAL_WINDOW_SIZE`][spec] option for HTTP2
12921308
/// stream-level flow control.
12931309
///

0 commit comments

Comments
 (0)