Do not try to write anything to sqlite after its closed

This commit is contained in:
Pavel Djundik 2018-03-14 08:45:52 +02:00 committed by GitHub
parent 74ccef02bf
commit 0af3f10997
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,6 +73,8 @@ class MessageStorage {
return; return;
} }
this.isEnabled = false;
this.database.close((err) => { this.database.close((err) => {
if (err) { if (err) {
log.error(`Failed to close sqlite database: ${err}`); log.error(`Failed to close sqlite database: ${err}`);