@@ -46,6 +46,7 @@ pub(crate) struct Config {
46
46
pub ( crate ) max_frame_size : u32 ,
47
47
pub ( crate ) enable_connect_protocol : bool ,
48
48
pub ( crate ) max_concurrent_streams : Option < u32 > ,
49
+ pub ( crate ) max_pending_accept_reset_streams : Option < usize > ,
49
50
#[ cfg( feature = "runtime" ) ]
50
51
pub ( crate ) keep_alive_interval : Option < Duration > ,
51
52
#[ cfg( feature = "runtime" ) ]
@@ -63,6 +64,7 @@ impl Default for Config {
63
64
max_frame_size : DEFAULT_MAX_FRAME_SIZE ,
64
65
enable_connect_protocol : false ,
65
66
max_concurrent_streams : None ,
67
+ max_pending_accept_reset_streams : None ,
66
68
#[ cfg( feature = "runtime" ) ]
67
69
keep_alive_interval : None ,
68
70
#[ cfg( feature = "runtime" ) ]
@@ -125,6 +127,9 @@ where
125
127
if let Some ( max) = config. max_concurrent_streams {
126
128
builder. max_concurrent_streams ( max) ;
127
129
}
130
+ if let Some ( max) = config. max_pending_accept_reset_streams {
131
+ builder. max_pending_accept_reset_streams ( max) ;
132
+ }
128
133
if config. enable_connect_protocol {
129
134
builder. enable_connect_protocol ( ) ;
130
135
}
@@ -503,7 +508,6 @@ where
503
508
}
504
509
}
505
510
506
-
507
511
if !body. is_end_stream ( ) {
508
512
// automatically set Content-Length from body...
509
513
if let Some ( len) = body. size_hint ( ) . exact ( ) {
0 commit comments