Skip to content

Commit

Permalink
fix(connection-failure): Reject all pending commands, not just LOGOUT
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Jan 28, 2025
1 parent 2b4b240 commit 1b42a61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/imap-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ class ImapFlow extends EventEmitter {
// reject command that is currently processed
if (this.currentRequest && this.requestTagMap.has(this.currentRequest.tag)) {
let request = this.requestTagMap.get(this.currentRequest.tag);
if (request && ['LOGOUT'].includes(request.command)) {
if (request) {
this.requestTagMap.delete(request.tag);
const error = new Error('Connection not available');
error.code = 'NoConnection';
Expand Down

0 comments on commit 1b42a61

Please sign in to comment.