From a866c0ece1b80e4536edc2710e07c0d4570e6e2d Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Tue, 25 Sep 2018 11:29:51 +0300 Subject: [PATCH] v1.4.18 --- lib/handlers/on-store.js | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/handlers/on-store.js b/lib/handlers/on-store.js index e335629c..ded75809 100644 --- a/lib/handlers/on-store.js +++ b/lib/handlers/on-store.js @@ -157,12 +157,12 @@ module.exports = server => (mailbox, update, session, callback) => { } if (queryAll && !session.selected.uidList.includes(message.uid)) { // skip processing messages that we do not know about yet - return processNext(); + return setImmediate(processNext); } if (update.unchangedSince && message.modseq > update.unchangedSince) { modified.push(message.uid); - return processNext(); + return setImmediate(processNext); } let flagsupdate = false; // query object for updates @@ -389,21 +389,21 @@ module.exports = server => (mailbox, update, session, callback) => { server.notifier.addEntries(mailboxData, notifyEntries, () => { notifyEntries = []; server.notifier.fire(session.user.id); - processNext(); + return setImmediate(processNext); }); } ); } else { - processNext(); + return setImmediate(processNext); } }); } else { - processNext(); + return setImmediate(processNext); } }); }; - processNext(); + return setImmediate(processNext); } ); }; diff --git a/package.json b/package.json index 538532c4..75471281 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wildduck", - "version": "1.4.17", + "version": "1.4.18", "description": "IMAP/POP3 server built with Node.js and MongoDB", "main": "server.js", "scripts": {