diff --git a/lib/pop3/connection.js b/lib/pop3/connection.js index d03aee95..b1e1f15c 100644 --- a/lib/pop3/connection.js +++ b/lib/pop3/connection.js @@ -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 => {