1
0
mirror of https://github.com/redis/go-redis.git synced 2025-08-01 16:06:54 +03:00

free turn when leave with error (#2658)

Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
This commit is contained in:
cyningsun
2023-10-30 23:42:26 +08:00
committed by GitHub
parent 7ebb537c80
commit 4408f8cfb2

View File

@ -263,6 +263,7 @@ func (p *ConnPool) Get(ctx context.Context) (*Conn, error) {
p.connsMu.Unlock()
if err != nil {
p.freeTurn()
return nil, err
}