Skip to content

Conversation

cdoolin
Copy link

@cdoolin cdoolin commented Feb 18, 2023

Connection.close only sets _conn = None, it does not update _connected. This causes a Pool to break when a Connection has been closed manually or if a connection error occurs causing the connection to be closed.

Copy link

@waketzheng waketzheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be:

if conn.connected and not conn.closed:

And would be better to add some tests

@robert-lore
Copy link

This is something we've struggled with as well. Would be nice to have a solution.

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.

3 participants