Merge pull request #2222 from thelounge/xpaw/sqlite-close

Do not try to write anything to sqlite after its closed
This commit is contained in:
Jérémie Astori 2018-03-14 03:07:01 -04:00 committed by GitHub
commit a7e928ed4f
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}`);