Closed oleriajm closed 7 months ago
@oleriajm thank you very much for bringing this to our attention. I'm able to reproduce the bug on my end. I'll review the attached PR asap.
Fixed by PR https://github.com/neo4j/neo4j-go-driver/pull/570, attempting to use a closed session now returns a usage error. Thank you @oleriajm for bringing this to our attention 👍.
Guidelines
https://github.com/neo4j/neo4j-go-driver/pull/568
The Session must not be usable after the caller closed it explicitly.
Following pattern works just fine at the moment
This is because Closing session cleans up pool/router etc, but all the references are still preserved.
As a good practice, the behavior should be fail-fast/fail-hard once you called Close on it
see here https://github.com/neo4j/neo4j-go-driver/pull/568
Example bug report
Steps to reproduce
see https://github.com/neo4j/neo4j-go-driver/pull/568
Expected behavior
Actual behavior