fix fetch() message 'ending' for multiple messages

fork
Brian White 12 years ago
parent 15a8077d16
commit b4051174df

@ -228,10 +228,10 @@ ImapConnection.prototype.connect = function(loginCb) {
function emitMsgEnd(key) {
var fetches = requests[0].fetchers[key];
for (var i=0, len=fetches.length; i<len; ++i) {
if (fetches[i]._msg._ended)
continue;
fetches[i]._msg.emit('end');
fetches[i]._msg._ended = true;
if (fetches[i]._msg) {
fetches[i]._msg.emit('end');
fetches[i]._msg = undefined;
}
}
}

Loading…
Cancel
Save