Skip to content

Ensure connection/cursor is closed even if rollback fails (fix #471)#474

Open
M0d3v1 wants to merge 2 commits intoaio-libs:masterfrom
M0d3v1:fix-471-rollback-close
Open

Ensure connection/cursor is closed even if rollback fails (fix #471)#474
M0d3v1 wants to merge 2 commits intoaio-libs:masterfrom
M0d3v1:fix-471-rollback-close

Conversation

@M0d3v1
Copy link

@M0d3v1 M0d3v1 commented Feb 14, 2026

If rollback() raises during error cleanup, close() was not executed.

Wrap rollback() in try/finally to guarantee close() runs and prevent
connection or cursor leaks.

Fixes #471.

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.

Connection not closed on rollback error

1 participant