File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ pub struct HttpConfig {
58
58
write_timeout_ms : Option < u64 > ,
59
59
pub http2 : bool ,
60
60
pub max_redirects : Option < usize > ,
61
+ pub max_concurrent_requests : Option < usize > ,
61
62
}
62
63
63
64
impl HttpConfig {
@@ -84,13 +85,18 @@ impl HttpConfig {
84
85
property : "http2" ,
85
86
} ) ?
86
87
. unwrap_or ( true ) ;
88
+ let max_concurrent_requests = config. parse ( BuckconfigKeyRef {
89
+ section : "http" ,
90
+ property : "max_concurrent_requests" ,
91
+ } ) ?;
87
92
88
93
Ok ( Self {
89
94
connect_timeout_ms,
90
95
read_timeout_ms,
91
96
write_timeout_ms,
92
97
max_redirects,
93
98
http2,
99
+ max_concurrent_requests,
94
100
} )
95
101
}
96
102
Original file line number Diff line number Diff line change @@ -953,6 +953,9 @@ async fn http_client_from_startup_config(
953
953
}
954
954
_ => { }
955
955
}
956
+ if let Some ( n) = config. http . max_concurrent_requests {
957
+ builder. with_max_concurrent_requests ( n) ;
958
+ }
956
959
957
960
Ok ( builder)
958
961
}
You can’t perform that action at this time.
0 commit comments