From 5191aae3dfed821143449192ba9294255884aa8c Mon Sep 17 00:00:00 2001 From: Irine Sistiana <49315432+IrineSistiana@users.noreply.github.com> Date: Tue, 3 Oct 2023 23:57:36 +0800 Subject: [PATCH] transport: fixed pipeline conn leaking --- pkg/upstream/transport/pipeline.go | 1 + 1 file changed, 1 insertion(+) 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