File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -180,10 +180,15 @@ async fn main() -> Result<(), Box<dyn Error>> {
180180 . build ( ) ?) ,
181181 } ;
182182
183+ let mut http_connector = hyper:: client:: connect:: HttpConnector :: new ( ) ;
184+ // FIXME: make configurable
185+ http_connector. set_keepalive ( Some ( Duration :: from_millis ( 15000 ) ) ) ;
186+ http_connector. set_nodelay ( true ) ;
187+
183188 let http_client = hyper:: Client :: builder ( )
184189 . http1_title_case_headers ( true )
185190 . set_host ( false )
186- . build_http :: < hyper :: Body > ( ) ;
191+ . build ( http_connector ) ;
187192
188193 // start QUIC endpoint
189194
@@ -431,7 +436,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
431436 }
432437 } ) ;
433438 Server :: bind ( & listener_addr)
434- . http1_title_case_headers ( true )
439+ . tcp_nodelay ( true ) // FIXME: make configurable
440+ . http1_title_case_headers ( true )
435441 . serve ( make_svc)
436442 . with_graceful_shutdown ( stop_token. cancelled ( ) )
437443 . await ?;
You can’t perform that action at this time.
0 commit comments