File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ use lambda_extension::{service_fn as extension_handler, Extension};
55use lambda_http:: { service_fn as http_handler, Body , Request , Response } ;
66use log:: * ;
77use reqwest:: { redirect, Client } ;
8+ use std:: time:: Duration ;
89use std:: { env, future, mem} ;
910use tokio_retry:: { strategy:: FixedInterval , Retry } ;
1011
@@ -57,7 +58,11 @@ async fn main() -> Result<(), Error> {
5758 . expect ( "application server is not ready" ) ;
5859
5960 // start lambda runtime
60- let http_client = & Client :: builder ( ) . redirect ( redirect:: Policy :: none ( ) ) . build ( ) . unwrap ( ) ;
61+ let http_client = & Client :: builder ( )
62+ . redirect ( redirect:: Policy :: none ( ) )
63+ . pool_idle_timeout ( Duration :: from_secs ( 4 ) )
64+ . build ( )
65+ . unwrap ( ) ;
6166 lambda_http:: run ( http_handler ( |event : Request | async move {
6267 http_proxy_handler ( event, http_client, options) . await
6368 } ) )
You can’t perform that action at this time.
0 commit comments