Skip to content

Commit

Permalink
fix: fixed edge case where session not set and uncaught exception o…
Browse files Browse the repository at this point in the history
…ccurs (#780)
  • Loading branch information
titanism authored Feb 5, 2025
1 parent 959c707 commit 8244559
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/pop3/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,12 @@ class POP3Connection extends EventEmitter {
username,
'PLAIN'
);

if (!this.session) {
// already closed, do nothing
return;
}

this.session.user = response.user;

this.openMailbox(err => {
Expand Down

0 comments on commit 8244559

Please sign in to comment.