@@ -10,7 +10,7 @@ use tokio::io::{AsyncRead, AsyncWrite};
1010
1111use super :: { decode_content_length, ping, PipeToSendStream , SendBuf } ;
1212use crate :: body:: HttpBody ;
13- use crate :: common:: { task , exec:: Exec , Future , Never , Pin , Poll } ;
13+ use crate :: common:: { exec:: Exec , task , Future , Never , Pin , Poll } ;
1414use crate :: headers;
1515use crate :: proto:: Dispatched ;
1616use crate :: { Body , Request , Response } ;
@@ -44,6 +44,7 @@ pub(crate) struct Config {
4444 pub ( crate ) keep_alive_timeout : Duration ,
4545 #[ cfg( feature = "runtime" ) ]
4646 pub ( crate ) keep_alive_while_idle : bool ,
47+ pub ( crate ) max_concurrent_reset_streams : Option < usize > ,
4748}
4849
4950impl Default for Config {
@@ -59,6 +60,7 @@ impl Default for Config {
5960 keep_alive_timeout : Duration :: from_secs ( 20 ) ,
6061 #[ cfg( feature = "runtime" ) ]
6162 keep_alive_while_idle : false ,
63+ max_concurrent_reset_streams : None ,
6264 }
6365 }
6466}
@@ -70,6 +72,9 @@ fn new_builder(config: &Config) -> Builder {
7072 . initial_connection_window_size ( config. initial_conn_window_size )
7173 . max_frame_size ( config. max_frame_size )
7274 . enable_push ( false ) ;
75+ if let Some ( max) = config. max_concurrent_reset_streams {
76+ builder. max_concurrent_reset_streams ( max) ;
77+ }
7378 builder
7479}
7580
0 commit comments