|
|
|
@ -132,7 +132,7 @@ ImapConnection.prototype.connect = function(loginCb) {
|
|
|
|
|
state.conn.on('close', function(had_error) {
|
|
|
|
|
self._reset();
|
|
|
|
|
requests = state.requests;
|
|
|
|
|
self.debug&&self.debug('[connection] Connection forcefully closed.');
|
|
|
|
|
self.debug&&self.debug('[connection] Connection closed.');
|
|
|
|
|
self.emit('close', had_error);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -249,9 +249,6 @@ ImapConnection.prototype.connect = function(loginCb) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (b.p < b.length)
|
|
|
|
|
process.nextTick(function() { ondata(b); });
|
|
|
|
|
|
|
|
|
|
if (ondata.line[0] === '*') { // Untagged server response
|
|
|
|
|
var isUnsolicited =
|
|
|
|
|
(requests[0] && requests[0].cmd === 'NOOP')
|
|
|
|
@ -501,6 +498,8 @@ ImapConnection.prototype.connect = function(loginCb) {
|
|
|
|
|
ondata.temp = undefined;
|
|
|
|
|
ondata.streaming = false;
|
|
|
|
|
ondata.expect = -1;
|
|
|
|
|
if (b.p < b.length)
|
|
|
|
|
return ondata(b);
|
|
|
|
|
} else if (ondata.line[0] === 'A' || ondata.line[0] === '+') {
|
|
|
|
|
var line = ondata.line;
|
|
|
|
|
ondata.literals = [];
|
|
|
|
|