mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
IMAP: exclude IDLE from infinite loop detection
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1938 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
a15f954419
commit
c28c021c09
@ -651,7 +651,7 @@ public class ImapConnection extends AbstractConnection {
|
||||
String command = line.substring(spaceIndex + 1);
|
||||
if (command.equals(lastCommand)) {
|
||||
lastCommandCount++;
|
||||
if (lastCommandCount > 100 && !"NOOP".equalsIgnoreCase(lastCommand)) {
|
||||
if (lastCommandCount > 100 && !"NOOP".equalsIgnoreCase(lastCommand) && !"IDLE".equalsIgnoreCase(lastCommand)) {
|
||||
// more than a hundred times the same command => this is a client infinite loop, close connection
|
||||
throw new IOException("Infinite loop on command " + command + " detected");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user