proxy/tcpproxy: fix dup unweighted remotes (#11552)

This commit is contained in:
Ning Xie
2020-01-24 06:27:34 +08:00
committed by Xiang Li
parent c3497c84ed
commit 798c073b89

View File

@@ -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 {