Skip to content

Commit 61d59ca

Browse files
authored
fix: expo sqlite driver disconnect() (#6027)
Currently the disconnect() function does not perform a call to databaseConnection close, it only sets the queryRunner and databaseConnection to undefined, this behavior may cause problems when you do something like this: 1 - await getConnection().close(); 2 - Replace the database file 3 - Try to open connection createConnection(); and do some insert more info: expo/expo#8109
1 parent e92c743 commit 61d59ca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/driver/expo/ExpoDriver.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export class ExpoDriver extends AbstractSqliteDriver {
4040
return new Promise<void>((ok, fail) => {
4141
try {
4242
this.queryRunner = undefined;
43+
this.databaseConnection._db.close();
4344
this.databaseConnection = undefined;
4445
ok();
4546
} catch (error) {

0 commit comments

Comments
 (0)