Skip to content

Commit 47819ca

Browse files
authored
Use cached default connector in hyper_migration.rs (#968)
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
1 parent fff4bea commit 47819ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ddcommon/src/hyper_migration.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ use hyper::Request as HyperRequest;
2020
pub fn new_client_periodic() -> HttpClient {
2121
hyper_util::client::legacy::Client::builder(hyper_util::rt::TokioExecutor::default())
2222
.pool_max_idle_per_host(0)
23-
.build(Connector::new())
23+
.build(Connector::default())
2424
}
2525

2626
/// Create a new default configuration hyper client.
2727
///
2828
/// It will keep connections open for a longer time and reuse them.
2929
pub fn new_default_client() -> HttpClient {
3030
hyper_util::client::legacy::Client::builder(hyper_util::rt::TokioExecutor::default())
31-
.build(Connector::new())
31+
.build(Connector::default())
3232
}
3333

3434
pub type HttpResponse = hyper::Response<Body>;

0 commit comments

Comments
 (0)