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

Return error if operation is attempted on a closed session #570

Merged

Conversation

StephenCathcart
Copy link
Contributor

@StephenCathcart StephenCathcart commented Feb 22, 2024

A session is still usable even after closing it explicitly:

session := driver.NewSession(ctx, sessionConfig)
session.Close()
// These all still work
session.Run(...)
session.BeginTransaction(...)
session.ExecuteRead(...)
session.ExecuteWrite(...)

We now return a new UsageError when an operation is attempted on a closed session.

Fixes issue: #569 raised by @oleriajm

@StephenCathcart
Copy link
Contributor Author

@StephenCathcart StephenCathcart merged commit 21c64d6 into neo4j:5.0 Feb 23, 2024
5 checks passed
@StephenCathcart StephenCathcart deleted the bug/session-usable-after-close branch February 23, 2024 13:32
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.

2 participants