mirror of
https://github.com/moparisthebest/davmail
synced 2024-08-13 16:53:51 -04:00
IMAP: Handle exception during IDLE
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1021 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
d1391d9ffe
commit
ec6634d043
@ -431,6 +431,7 @@ public class ImapConnection extends AbstractConnection {
|
||||
// clear cache before going to idle mode
|
||||
currentFolder.clearCache();
|
||||
DavGatewayTray.resetIcon();
|
||||
try {
|
||||
int count = 0;
|
||||
while (!in.ready()) {
|
||||
if (++count >= imapIdleDelay) {
|
||||
@ -450,6 +451,10 @@ public class ImapConnection extends AbstractConnection {
|
||||
} else {
|
||||
sendClient(commandId + " BAD command unrecognized");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// client connection closed
|
||||
throw new SocketException(e.getMessage());
|
||||
}
|
||||
} else if ("noop".equalsIgnoreCase(command) || "check".equalsIgnoreCase(command)) {
|
||||
if (currentFolder != null) {
|
||||
DavGatewayTray.debug(new BundleMessage("LOG_IMAP_COMMAND", command, currentFolder.folderName));
|
||||
|
Loading…
Reference in New Issue
Block a user