Skip to content

Commit

Permalink
transport: fixed pipeline conn leaking
Browse files Browse the repository at this point in the history
  • Loading branch information
IrineSistiana committed Oct 3, 2023
1 parent 4037338 commit 5191aae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/upstream/transport/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5191aae

Please sign in to comment.