From 5a0e0b67181a4785b7087991b6d69c13471bb50d Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sat, 15 Feb 2020 11:50:07 +0200 Subject: [PATCH] Change sqlite parallelize to serialize when loading messages --- src/plugins/messageStorage/sqlite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/messageStorage/sqlite.js b/src/plugins/messageStorage/sqlite.js index 2342f567..a1c56cd9 100644 --- a/src/plugins/messageStorage/sqlite.js +++ b/src/plugins/messageStorage/sqlite.js @@ -159,7 +159,7 @@ class MessageStorage { const limit = Helper.config.maxHistory < 0 ? 100000 : Helper.config.maxHistory; return new Promise((resolve, reject) => { - this.database.parallelize(() => + this.database.serialize(() => this.database.all( "SELECT msg, type, time FROM messages WHERE network = ? AND channel = ? ORDER BY time DESC LIMIT ?", [network.uuid, channel.name.toLowerCase(), limit],