Skip to content

Commit 7252393

Browse files
VaizEvgenii Shutov (from Dev Box)
andauthored
perf(client): avoid redundant URI construction for pooled connections (#265)
Co-authored-by: Evgenii Shutov (from Dev Box) <eshutov@microsoft.com>
1 parent b23a13e commit 7252393

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/legacy/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,6 @@ where
495495
let ver = self.config.ver;
496496
let is_ver_h2 = ver == Ver::Http2;
497497
let connector = self.connector.clone();
498-
let dst = domain_as_uri(pool_key.clone());
499498
hyper_lazy(move || {
500499
// Try to take a "connecting lock".
501500
//
@@ -511,6 +510,7 @@ where
511510
return Either::Right(future::err(canceled));
512511
}
513512
};
513+
let dst = domain_as_uri(pool_key);
514514
Either::Left(
515515
connector
516516
.connect(super::connect::sealed::Internal, dst)

0 commit comments

Comments
 (0)