Skip to content

Fix TypeError: Cannot read properties of undefined (reading 'isActive') #881

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

Merged
merged 1 commit into from
Feb 21, 2022

Conversation

bigmontz
Copy link
Contributor

This error occurs in situations where the pool was already close, the acquire resource was already completed and a pool was recreated in the meantime. In this situation,
the _release method is called again but with an empty pool state causing the error.

For solving this issue, we should check if the state is defined before check the isActive. Undefined poolState should be considered closed in this case and the connection
should be destroyed.

…e')`

This error occurs in situations where the pool was already close, the acquire resource was already completed and a pool was recreated in the meantime. In this situation,
the _release method is called again but with an empty pool state causing the error.

For solving this issue, we should check if the state is defined before check the `isActive`. Undefined poolState should be considered closed in this case and the connection
should be detroyed.
@bigmontz bigmontz merged commit 01e6420 into neo4j:4.4 Feb 21, 2022
@bigmontz bigmontz deleted the 4.4-fix-release-resource branch February 21, 2022 21:31
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