@@ -41,6 +41,7 @@ const DEFAULT_MAX_FRAME_SIZE: u32 = 1024 * 16; // 16kb
41
41
const DEFAULT_MAX_SEND_BUF_SIZE : usize = 1024 * 400 ; // 400kb
42
42
// 16 MB "sane default" taken from golang http2
43
43
const DEFAULT_SETTINGS_MAX_HEADER_LIST_SIZE : u32 = 16 << 20 ;
44
+ const DEFAULT_MAX_LOCAL_ERROR_RESET_STREAMS : usize = 1024 ;
44
45
45
46
#[ derive( Clone , Debug ) ]
46
47
pub ( crate ) struct Config {
@@ -51,6 +52,7 @@ pub(crate) struct Config {
51
52
pub ( crate ) enable_connect_protocol : bool ,
52
53
pub ( crate ) max_concurrent_streams : Option < u32 > ,
53
54
pub ( crate ) max_pending_accept_reset_streams : Option < usize > ,
55
+ pub ( crate ) max_local_error_reset_streams : Option < usize > ,
54
56
pub ( crate ) keep_alive_interval : Option < Duration > ,
55
57
pub ( crate ) keep_alive_timeout : Duration ,
56
58
pub ( crate ) max_send_buffer_size : usize ,
@@ -67,6 +69,7 @@ impl Default for Config {
67
69
enable_connect_protocol : false ,
68
70
max_concurrent_streams : Some ( 200 ) ,
69
71
max_pending_accept_reset_streams : None ,
72
+ max_local_error_reset_streams : Some ( DEFAULT_MAX_LOCAL_ERROR_RESET_STREAMS ) ,
70
73
keep_alive_interval : None ,
71
74
keep_alive_timeout : Duration :: from_secs ( 20 ) ,
72
75
max_send_buffer_size : DEFAULT_MAX_SEND_BUF_SIZE ,
@@ -130,6 +133,7 @@ where
130
133
. initial_connection_window_size ( config. initial_conn_window_size )
131
134
. max_frame_size ( config. max_frame_size )
132
135
. max_header_list_size ( config. max_header_list_size )
136
+ . max_local_error_reset_streams ( config. max_pending_accept_reset_streams )
133
137
. max_send_buffer_size ( config. max_send_buffer_size ) ;
134
138
if let Some ( max) = config. max_concurrent_streams {
135
139
builder. max_concurrent_streams ( max) ;
0 commit comments