@@ -41,6 +41,7 @@ const DEFAULT_MAX_FRAME_SIZE: u32 = 1024 * 16; // 16kb
4141const DEFAULT_MAX_SEND_BUF_SIZE : usize = 1024 * 400 ; // 400kb
4242 // 16 MB "sane default" taken from golang http2
4343const DEFAULT_SETTINGS_MAX_HEADER_LIST_SIZE : u32 = 16 << 20 ;
44+ const DEFAULT_MAX_LOCAL_ERROR_RESET_STREAMS : usize = 1024 ;
4445
4546#[ derive( Clone , Debug ) ]
4647pub ( crate ) struct Config {
@@ -51,6 +52,7 @@ pub(crate) struct Config {
5152 pub ( crate ) enable_connect_protocol : bool ,
5253 pub ( crate ) max_concurrent_streams : Option < u32 > ,
5354 pub ( crate ) max_pending_accept_reset_streams : Option < usize > ,
55+ pub ( crate ) max_local_error_reset_streams : Option < usize > ,
5456 pub ( crate ) keep_alive_interval : Option < Duration > ,
5557 pub ( crate ) keep_alive_timeout : Duration ,
5658 pub ( crate ) max_send_buffer_size : usize ,
@@ -67,6 +69,7 @@ impl Default for Config {
6769 enable_connect_protocol : false ,
6870 max_concurrent_streams : Some ( 200 ) ,
6971 max_pending_accept_reset_streams : None ,
72+ max_local_error_reset_streams : Some ( DEFAULT_MAX_LOCAL_ERROR_RESET_STREAMS ) ,
7073 keep_alive_interval : None ,
7174 keep_alive_timeout : Duration :: from_secs ( 20 ) ,
7275 max_send_buffer_size : DEFAULT_MAX_SEND_BUF_SIZE ,
@@ -130,6 +133,7 @@ where
130133 . initial_connection_window_size ( config. initial_conn_window_size )
131134 . max_frame_size ( config. max_frame_size )
132135 . max_header_list_size ( config. max_header_list_size )
136+ . max_local_error_reset_streams ( config. max_pending_accept_reset_streams )
133137 . max_send_buffer_size ( config. max_send_buffer_size ) ;
134138 if let Some ( max) = config. max_concurrent_streams {
135139 builder. max_concurrent_streams ( max) ;
0 commit comments