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:
mguessan 2012-03-22 20:56:56 +00:00
parent a15f954419
commit c28c021c09
1 changed files with 1 additions and 1 deletions

View File

@ -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");
}