Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: free turn of connection pool when leave with error #2658

Merged
merged 6 commits into from
Oct 30, 2023

Conversation

cyningsun
Copy link
Contributor

pool turn is taken but without free after calling popIdle() and leave with error.

There are two if conditions may return error inside popIdle()

func (p *ConnPool) popIdle() (*Conn, error) {
	if p.closed() {
		return nil, ErrClosed
	}
	n := len(p.idleConns)
	if n == 0 {
		return nil, nil
	}

@chayim chayim added the bug label Jul 23, 2023
@ofekshenawa ofekshenawa merged commit 4408f8c into redis:master Oct 30, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants