mirror of
https://github.com/moparisthebest/davmail
synced 2024-11-12 04:15:08 -05: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
|
// clear cache before going to idle mode
|
||||||
currentFolder.clearCache();
|
currentFolder.clearCache();
|
||||||
DavGatewayTray.resetIcon();
|
DavGatewayTray.resetIcon();
|
||||||
|
try {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (!in.ready()) {
|
while (!in.ready()) {
|
||||||
if (++count >= imapIdleDelay) {
|
if (++count >= imapIdleDelay) {
|
||||||
@ -450,6 +451,10 @@ public class ImapConnection extends AbstractConnection {
|
|||||||
} else {
|
} else {
|
||||||
sendClient(commandId + " BAD command unrecognized");
|
sendClient(commandId + " BAD command unrecognized");
|
||||||
}
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
// client connection closed
|
||||||
|
throw new SocketException(e.getMessage());
|
||||||
|
}
|
||||||
} else if ("noop".equalsIgnoreCase(command) || "check".equalsIgnoreCase(command)) {
|
} else if ("noop".equalsIgnoreCase(command) || "check".equalsIgnoreCase(command)) {
|
||||||
if (currentFolder != null) {
|
if (currentFolder != null) {
|
||||||
DavGatewayTray.debug(new BundleMessage("LOG_IMAP_COMMAND", command, currentFolder.folderName));
|
DavGatewayTray.debug(new BundleMessage("LOG_IMAP_COMMAND", command, currentFolder.folderName));
|
||||||
|
Loading…
Reference in New Issue
Block a user