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 race condition when removing closed connections from the pool #437

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

tomchristie
Copy link
Member

When there's more than one request made (or queued) on a connection, and the connection is closed, we should guard against trying to pop it from the pool twice. There's no good reason to assume that of the multiple calls to response_closed() that only the final call will happen to satisfy connection.is_closed().

@tomchristie tomchristie merged commit 0e8bc1f into master Nov 17, 2021
@tomchristie tomchristie deleted the fix-close-connection-race-condition branch November 17, 2021 14:12
@tomchristie tomchristie mentioned this pull request Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant