Skip to content

[4.3] Fix removing connection twice from pool. #598

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 1, 2021

Conversation

robsdedude
Copy link
Member

When trying to close a stale connection the driver count realize that the
connection is dead on trying to send GOODBYE. This would cause the connection
to make sure that all connections to the same address would get removed from
the pool as well. Since this removal only happens as a side effect of
connection.close() and does not always happen, the driver would still try
to remove the (now already removed) connection form the pool after closure.

Fixes: ValueError: deque.remove(x): x not in deque

When trying to close a stale connection the driver count realize that the
connection is dead on trying to send GOODBYE. This would cause the connection
to make sure that all connections to the same address would get removed from
the pool as well. Since this removal only happens as a side effect of
`connection.close()` and does not always happen, the driver would still try
to remove the (now already removed) connection form the pool after closure.

Fixes: `ValueError: deque.remove(x): x not in deque`
@robsdedude robsdedude merged commit 6cfd0c6 into neo4j:4.3 Oct 1, 2021
@robsdedude robsdedude deleted the fix-connection-not-in-deque-4.3 branch October 1, 2021 13:35
@Gwojda Gwojda mentioned this pull request Jun 2, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant