From 798c073b894a41a5296ef0266923fa54f61c36ae Mon Sep 17 00:00:00 2001 From: Ning Xie Date: Fri, 24 Jan 2020 06:27:34 +0800 Subject: [PATCH] proxy/tcpproxy: fix dup unweighted remotes (#11552) --- proxy/tcpproxy/userspace.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/tcpproxy/userspace.go b/proxy/tcpproxy/userspace.go index 94575307a..8ae98ffbb 100644 --- a/proxy/tcpproxy/userspace.go +++ b/proxy/tcpproxy/userspace.go @@ -117,7 +117,7 @@ func (tp *TCPProxy) pick() *remote { bestPr = r.srv.Priority w = 0 weighted = nil - unweighted = []*remote{r} + unweighted = nil fallthrough case r.srv.Priority == bestPr: if r.srv.Weight > 0 {