File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -1238,6 +1238,22 @@ impl Builder {
1238
1238
self
1239
1239
}
1240
1240
1241
+ /// Configures the maximum number of pending reset streams allowed before a GOAWAY will be sent.
1242
+ ///
1243
+ /// This will default to the default value set by the [`h2` crate](https://crates.io/crates/h2).
1244
+ /// As of v0.4.0, it is 20.
1245
+ ///
1246
+ /// See <https://github.com/hyperium/hyper/issues/2877> for more information.
1247
+ #[ cfg( feature = "http2" ) ]
1248
+ #[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
1249
+ pub fn http2_max_pending_accept_reset_streams (
1250
+ & mut self ,
1251
+ max : impl Into < Option < usize > > ,
1252
+ ) -> & mut Self {
1253
+ self . h2_builder . max_pending_accept_reset_streams = max. into ( ) ;
1254
+ self
1255
+ }
1256
+
1241
1257
/// Sets the [`SETTINGS_INITIAL_WINDOW_SIZE`][spec] option for HTTP2
1242
1258
/// stream-level flow control.
1243
1259
///
Original file line number Diff line number Diff line change @@ -551,6 +551,17 @@ impl<E> Http2Builder<'_, E> {
551
551
}
552
552
}
553
553
554
+ /// Configures the maximum number of pending reset streams allowed before a GOAWAY will be sent.
555
+ ///
556
+ /// This will default to the default value set by the [`h2` crate](https://crates.io/crates/h2).
557
+ /// As of v0.4.0, it is 20.
558
+ ///
559
+ /// See <https://github.com/hyperium/hyper/issues/2877> for more information.
560
+ pub fn max_pending_accept_reset_streams ( mut self , max : impl Into < Option < usize > > ) -> Self {
561
+ self . protocol . http2_max_pending_accept_reset_streams ( max) ;
562
+ self
563
+ }
564
+
554
565
/// Sets the [`SETTINGS_INITIAL_WINDOW_SIZE`][spec] option for HTTP2
555
566
/// stream-level flow control.
556
567
///
You can’t perform that action at this time.
0 commit comments