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

fix:The database connection is not closed during the catch block #1707

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KotoriMinami
Copy link

@KotoriMinami KotoriMinami commented Nov 15, 2023

If this instance is not closed, it will result in the occupation of the database file.

When subsequent calls to setUpWithMigrations or setUpWithSchema reach the execution of unsafeDestroyEverything,

this._setUpWithSchema(callback)

this._setUpWithSchema(callback)

Due to the old instance not closing the connection, even though the connection of the new instance is closed, an error resource busy or locked still occurs when executing fs.unlinkSync

This fixes #1705

@radex
Copy link
Collaborator

radex commented Apr 21, 2024

Thanks for the fix @KotoriMinami, but tests no longer pass after this

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.

In a Node.js environment, throws a resource lock error.
2 participants