diff --git a/src/adapters/sqlite/sqlite-node/DatabaseBridge.js b/src/adapters/sqlite/sqlite-node/DatabaseBridge.js index 480ff4d28..b1f902131 100644 --- a/src/adapters/sqlite/sqlite-node/DatabaseBridge.js +++ b/src/adapters/sqlite/sqlite-node/DatabaseBridge.js @@ -37,6 +37,9 @@ class DatabaseBridge { resolve({ code: 'ok' }) } catch (error) { + if (driver.database.instance && driver.database.instance.open) { + driver.database.instance.close() + } if (driver && error.type === 'SchemaNeededError') { this.waiting(tag, driver) resolve({ code: 'schema_needed' })