SusiMail: Fix NPE on logout (ticket #2266)

This commit is contained in:
zzz
2018-06-21 18:41:21 +00:00
parent e33bb2ac1e
commit 93c6df7e89
3 changed files with 15 additions and 6 deletions

View File

@@ -1316,11 +1316,13 @@ public class POP3MailBox implements NewMailListener {
if (socket != null && socket.isConnected()) {
try {
deletePending(!shouldWait);
if (shouldWait) {
sendCmd1a("QUIT");
if (_log.shouldDebug()) _log.debug("close() with wait complete");
} else {
sendCmd1aNoWait("QUIT");
if (socket != null && socket.isConnected()) {
if (shouldWait) {
sendCmd1a("QUIT");
if (_log.shouldDebug()) _log.debug("close() with wait complete");
} else {
sendCmd1aNoWait("QUIT");
}
}
} catch (IOException e) {
//if (_log.shouldDebug()) _log.debug("error closing: " + e);