mirror of https://github.com/go-redis/redis.git
free turn when leave with error (#2658)
Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
This commit is contained in:
parent
7ebb537c80
commit
4408f8cfb2
|
@ -263,6 +263,7 @@ func (p *ConnPool) Get(ctx context.Context) (*Conn, error) {
|
||||||
p.connsMu.Unlock()
|
p.connsMu.Unlock()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
p.freeTurn()
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue