From 6349fc6502646d3293e8d1160678a55bd04f47e7 Mon Sep 17 00:00:00 2001 From: Jacob Kiers Date: Fri, 25 Aug 2023 22:52:46 +0200 Subject: [PATCH] Prevent unnecessary clone This also ensures that the address resolver actually keeps state. Otherwise it was cloned before each resolution, resulting in it never keeping the resolved addresses. Signed-off-by: Jacob Kiers --- src/servers/protocol/tcp.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/servers/protocol/tcp.rs b/src/servers/protocol/tcp.rs index f33a7f8..f4565f6 100644 --- a/src/servers/protocol/tcp.rs +++ b/src/servers/protocol/tcp.rs @@ -72,21 +72,17 @@ async fn accept(inbound: TcpStream, proxy: Arc) -> Result<(), Box Result<(), Box> { match upstream { Upstream::Ban => {