Skip to content

Commit

Permalink
free turn when leave with error (#2658)
Browse files Browse the repository at this point in the history
Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
  • Loading branch information
cyningsun and ofekshenawa authored Oct 30, 2023
1 parent 7ebb537 commit 4408f8c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ func (p *ConnPool) Get(ctx context.Context) (*Conn, error) {
p.connsMu.Unlock()

if err != nil {
p.freeTurn()
return nil, err
}

Expand Down

0 comments on commit 4408f8c

Please sign in to comment.