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

commit fails on RiverSource.closeReading when database connection is already closed #251

Closed
metysj opened this issue May 27, 2014 · 1 comment

Comments

@metysj
Copy link

metysj commented May 27, 2014

It seems harmless, but with SQLite, calling closeReading fails and throws and exception in the logs as the database connection is already closed.

             // always commit before close to finish cursors/transactions
             if (!readConnection.getAutoCommit()) {
                 readConnection.commit();
             }
             if (!readConnection.isClosed()) {
                 readConnection.close();
             }

It seems like the test should be:

             // always commit before close to finish cursors/transactions
             if (!readConnection.isClosed() && !readConnection.getAutoCommit()) {
                 readConnection.commit();
             }
             if (!readConnection.isClosed()) {
                 readConnection.close();
             }
@jprante
Copy link
Owner

jprante commented May 28, 2014

Thanks, fixed in 1.2.0.1

@jprante jprante closed this as completed May 28, 2014
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

No branches or pull requests

2 participants