@@ -39,6 +39,7 @@ const DEFAULT_STREAM_WINDOW: u32 = 1024 * 1024; // 1mb
39
39
const DEFAULT_MAX_FRAME_SIZE : u32 = 1024 * 16 ; // 16kb
40
40
const DEFAULT_MAX_SEND_BUF_SIZE : usize = 1024 * 400 ; // 400kb
41
41
const 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 ;
42
43
43
44
#[ derive( Clone , Debug ) ]
44
45
pub ( crate ) struct Config {
@@ -49,6 +50,7 @@ pub(crate) struct Config {
49
50
pub ( crate ) enable_connect_protocol : bool ,
50
51
pub ( crate ) max_concurrent_streams : Option < u32 > ,
51
52
pub ( crate ) max_pending_accept_reset_streams : Option < usize > ,
53
+ pub ( crate ) max_local_error_reset_streams : Option < usize > ,
52
54
#[ cfg( feature = "runtime" ) ]
53
55
pub ( crate ) keep_alive_interval : Option < Duration > ,
54
56
#[ cfg( feature = "runtime" ) ]
@@ -67,6 +69,7 @@ impl Default for Config {
67
69
enable_connect_protocol : false ,
68
70
max_concurrent_streams : None ,
69
71
max_pending_accept_reset_streams : None ,
72
+ max_local_error_reset_streams : Some ( DEFAULT_MAX_LOCAL_ERROR_RESET_STREAMS ) ,
70
73
#[ cfg( feature = "runtime" ) ]
71
74
keep_alive_interval : None ,
72
75
#[ cfg( feature = "runtime" ) ]
@@ -125,6 +128,7 @@ where
125
128
. initial_connection_window_size ( config. initial_conn_window_size )
126
129
. max_frame_size ( config. max_frame_size )
127
130
. max_header_list_size ( config. max_header_list_size )
131
+ . max_local_error_reset_streams ( config. max_local_error_reset_streams )
128
132
. max_send_buffer_size ( config. max_send_buffer_size ) ;
129
133
if let Some ( max) = config. max_concurrent_streams {
130
134
builder. max_concurrent_streams ( max) ;
0 commit comments