Skip to content

Commit 8244559

Browse files
authored
fix: fixed edge case where session not set and uncaught exception occurs (#780)
1 parent 959c707 commit 8244559

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/pop3/connection.js

+6
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,12 @@ class POP3Connection extends EventEmitter {
998998
username,
999999
'PLAIN'
10001000
);
1001+
1002+
if (!this.session) {
1003+
// already closed, do nothing
1004+
return;
1005+
}
1006+
10011007
this.session.user = response.user;
10021008

10031009
this.openMailbox(err => {

0 commit comments

Comments
 (0)