Skip to content

Commit

Permalink
Fix processing server output with unterminated responses
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Dec 7, 2019
1 parent 6ee5a69 commit c13230a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/smtp-connection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,12 @@ class SMTPConnection extends EventEmitter {
}
this._responseQueue.push(lines[i]);
}
if (this._responseQueue) {
lastline = this._responseQueue[this._responseQueue.length - 1];
if (/^\d+-/.test(lastline.split('\n').pop())) {
return;
}
}

this._processResponse();
}
Expand Down

0 comments on commit c13230a

Please sign in to comment.