@@ -39,6 +39,7 @@ const DEFAULT_STREAM_WINDOW: u32 = 1024 * 1024; // 1mb
3939const DEFAULT_MAX_FRAME_SIZE : u32 = 1024 * 16 ; // 16kb
4040const DEFAULT_MAX_SEND_BUF_SIZE : usize = 1024 * 400 ; // 400kb
4141const DEFAULT_SETTINGS_MAX_HEADER_LIST_SIZE : u32 = 16 << 20 ; // 16 MB "sane default" taken from golang http2
42+ const DEFAULT_MAX_LOCAL_ERROR_RESET_STREAMS : usize = 1024 ;
4243
4344#[ derive( Clone , Debug ) ]
4445pub ( crate ) struct Config {
@@ -49,6 +50,7 @@ pub(crate) struct Config {
4950 pub ( crate ) enable_connect_protocol : bool ,
5051 pub ( crate ) max_concurrent_streams : Option < u32 > ,
5152 pub ( crate ) max_pending_accept_reset_streams : Option < usize > ,
53+ pub ( crate ) max_local_error_reset_streams : Option < usize > ,
5254 #[ cfg( feature = "runtime" ) ]
5355 pub ( crate ) keep_alive_interval : Option < Duration > ,
5456 #[ cfg( feature = "runtime" ) ]
@@ -67,6 +69,7 @@ impl Default for Config {
6769 enable_connect_protocol : false ,
6870 max_concurrent_streams : None ,
6971 max_pending_accept_reset_streams : None ,
72+ max_local_error_reset_streams : Some ( DEFAULT_MAX_LOCAL_ERROR_RESET_STREAMS ) ,
7073 #[ cfg( feature = "runtime" ) ]
7174 keep_alive_interval : None ,
7275 #[ cfg( feature = "runtime" ) ]
@@ -125,6 +128,7 @@ where
125128 . initial_connection_window_size ( config. initial_conn_window_size )
126129 . max_frame_size ( config. max_frame_size )
127130 . max_header_list_size ( config. max_header_list_size )
131+ . max_local_error_reset_streams ( config. max_local_error_reset_streams )
128132 . max_send_buffer_size ( config. max_send_buffer_size ) ;
129133 if let Some ( max) = config. max_concurrent_streams {
130134 builder. max_concurrent_streams ( max) ;
0 commit comments