File tree 2 files changed +5
-8
lines changed
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ impl Default for Config {
62
62
initial_stream_window_size : DEFAULT_STREAM_WINDOW ,
63
63
max_frame_size : DEFAULT_MAX_FRAME_SIZE ,
64
64
enable_connect_protocol : false ,
65
- max_concurrent_streams : None ,
65
+ max_concurrent_streams : Some ( 200 ) ,
66
66
keep_alive_interval : None ,
67
67
keep_alive_timeout : Duration :: from_secs ( 20 ) ,
68
68
max_send_buffer_size : DEFAULT_MAX_SEND_BUF_SIZE ,
Original file line number Diff line number Diff line change @@ -177,7 +177,10 @@ impl<E> Builder<E> {
177
177
/// Sets the [`SETTINGS_MAX_CONCURRENT_STREAMS`][spec] option for HTTP2
178
178
/// connections.
179
179
///
180
- /// Default is no limit (`std::u32::MAX`). Passing `None` will do nothing.
180
+ /// Default is 200, but not part of the stability of hyper. It could change
181
+ /// in a future release. You are encouraged to set your own limit.
182
+ ///
183
+ /// Passing `None` will remove any limit.
181
184
///
182
185
/// [spec]: https://httpwg.org/specs/rfc9113.html#SETTINGS_MAX_CONCURRENT_STREAMS
183
186
pub fn max_concurrent_streams ( & mut self , max : impl Into < Option < u32 > > ) -> & mut Self {
@@ -191,9 +194,6 @@ impl<E> Builder<E> {
191
194
/// Pass `None` to disable HTTP2 keep-alive.
192
195
///
193
196
/// Default is currently disabled.
194
- ///
195
- /// # Cargo Feature
196
- ///
197
197
pub fn keep_alive_interval ( & mut self , interval : impl Into < Option < Duration > > ) -> & mut Self {
198
198
self . h2_builder . keep_alive_interval = interval. into ( ) ;
199
199
self
@@ -205,9 +205,6 @@ impl<E> Builder<E> {
205
205
/// be closed. Does nothing if `keep_alive_interval` is disabled.
206
206
///
207
207
/// Default is 20 seconds.
208
- ///
209
- /// # Cargo Feature
210
- ///
211
208
pub fn keep_alive_timeout ( & mut self , timeout : Duration ) -> & mut Self {
212
209
self . h2_builder . keep_alive_timeout = timeout;
213
210
self
You can’t perform that action at this time.
0 commit comments