wip: refactor: reconsider timeouts of connections

This commit is contained in:
Jun Kurihara 2023-12-11 18:23:08 +09:00
commit d526ce6cb4
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
8 changed files with 35 additions and 39 deletions

View file

@ -8,6 +8,7 @@ use crate::{
log::*,
};
use async_trait::async_trait;
use chrono::Duration;
use http::{Request, Response, Version};
use hyper::body::{Body, Incoming};
use hyper_util::client::legacy::{
@ -184,6 +185,7 @@ where
let mut http = HttpConnector::new();
http.enforce_http(false);
http.set_reuse_address(true);
http.set_keepalive(Some(_globals.proxy_config.upstream_idle_timeout));
hyper_tls::HttpsConnector::from((http, tls.into()))
})
};