wip: fix sync

This commit is contained in:
Jun Kurihara 2023-11-28 22:32:49 +09:00
commit 0741990154
No known key found for this signature in database
GPG key ID: D992B3E3DE1DED23

View file

@ -35,7 +35,7 @@ pub struct Forwarder<C, B> {
impl<C, B1, B2> ForwardRequest<B1, IncomingOr<B2>> for Forwarder<C, B1> impl<C, B1, B2> ForwardRequest<B1, IncomingOr<B2>> for Forwarder<C, B1>
where where
C: Send + Sync + Connect + Clone + 'static, C: Send + Sync + Connect + Clone + 'static,
B1: Body + Send + Unpin + 'static, B1: Body + Send + Sync + Unpin + 'static,
<B1 as Body>::Data: Send, <B1 as Body>::Data: Send,
<B1 as Body>::Error: Into<Box<(dyn std::error::Error + Send + Sync + 'static)>>, <B1 as Body>::Error: Into<Box<(dyn std::error::Error + Send + Sync + 'static)>>,
B2: Body, B2: Body,
@ -80,11 +80,7 @@ where
let connector = HttpsConnector::new(); let connector = HttpsConnector::new();
let executor = LocalExecutor::new(_globals.runtime_handle.clone()); let executor = LocalExecutor::new(_globals.runtime_handle.clone());
let inner_h2 = Client::builder(executor) let inner_h2 = Client::builder(executor).http2_only(true).build::<_, B1>(connector);
.http2_adaptive_window(true)
.http2_only(true)
.set_host(true)
.build::<_, B1>(connector);
// #[cfg(feature = "native-roots")] // #[cfg(feature = "native-roots")]
// let builder = hyper_rustls::HttpsConnectorBuilder::new().with_native_roots(); // let builder = hyper_rustls::HttpsConnectorBuilder::new().with_native_roots();