mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 13:31:10 +00:00
Prune some duplicated dependencies in the dep graph (#11433)
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
@@ -32,7 +32,7 @@ use bytes::buf::{Buf, Reader};
|
||||
use fnv::FnvHashMap;
|
||||
use futures::{channel::mpsc, future, prelude::*};
|
||||
use hyper::{client, Body, Client as HyperClient};
|
||||
use hyper_rustls::HttpsConnector;
|
||||
use hyper_rustls::{HttpsConnector, HttpsConnectorBuilder};
|
||||
use once_cell::sync::Lazy;
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_core::offchain::{HttpError, HttpRequestId, HttpRequestStatus, Timestamp};
|
||||
@@ -53,7 +53,13 @@ pub struct SharedClient(Arc<Lazy<HyperClient<HttpsConnector<client::HttpConnecto
|
||||
impl SharedClient {
|
||||
pub fn new() -> Self {
|
||||
Self(Arc::new(Lazy::new(|| {
|
||||
HyperClient::builder().build(HttpsConnector::with_native_roots())
|
||||
let connector = HttpsConnectorBuilder::new()
|
||||
.with_native_roots()
|
||||
.https_or_http()
|
||||
.enable_http1()
|
||||
.enable_http2()
|
||||
.build();
|
||||
HyperClient::builder().build(connector)
|
||||
})))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user