diff --git a/lib/imap.js b/lib/imap.js index d90e53d..49b02ae 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -1587,7 +1587,8 @@ ImapConnection.prototype._send = function(cmdstr, cb) { } if (idle.state !== IDLE_NONE && cmdstr !== 'DONE') { - if (cmdstr !== undefined && idle.state !== IDLE_DONE) { + if ((cmdstr !== undefined || reqs.length > 1) + && idle.state === IDLE_IDLING) { idle.state = IDLE_DONE; this._send('DONE'); }