diff --git a/pkg/upstream/transport/pipeline.go b/pkg/upstream/transport/pipeline.go index 70f9c8d53..fdcb55a8d 100644 --- a/pkg/upstream/transport/pipeline.go +++ b/pkg/upstream/transport/pipeline.go @@ -176,6 +176,7 @@ func (t *PipelineTransport) pickPipelineConnLocked() (int, *pipelineConn) { pci, pc := sliceRandGet(t.activeConns, t.r) if pc != nil && pc.dc.isClosed() { // closed conn, delete it and retry sliceDel(&t.activeConns, pci) + delete(t.conns, pc) continue } return pci, pc // conn pool is empty or we got a pc