Skip to content

Commit 4408f8c

Browse files
free turn when leave with error (#2658)
Co-authored-by: ofekshenawa <[email protected]>
1 parent 7ebb537 commit 4408f8c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/pool/pool.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ func (p *ConnPool) Get(ctx context.Context) (*Conn, error) {
263263
p.connsMu.Unlock()
264264

265265
if err != nil {
266+
p.freeTurn()
266267
return nil, err
267268
}
268269

0 commit comments

Comments
 (0)