Commit ddfc97ff authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #113 in ZP/z-push from bugfix/ZP-798-loopdetection-gets-stuck to develop

* commit 'c18dab8b':
  ZP-798 Fixed even more whitespace wishes.
  ZP-798 Fixed whitespace.
  ZP-798 Set maxCount to the current counter + the requested window size, to prevent maxCount being too high and LoopDetection to get stuck.
parents d8e7289b c18dab8b
......@@ -11,7 +11,7 @@
*
* Created : 20.10.2011
*
* Copyright 2007 - 2013 Zarafa Deutschland GmbH
* Copyright 2007 - 2015 Zarafa Deutschland GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
......@@ -736,7 +736,7 @@ class LoopDetection extends InterProcessData {
ZLog::Write(LOGLEVEL_DEBUG, "LoopDetection->Detect(): case 3.1 detected - loop detected, init loop mode");
$current['loopcount'] = 1;
// the MaxCount is the max number of messages exported before
$current['maxCount'] = $counter + (($maxItems < $queuedMessages)? $maxItems: $queuedMessages);
$current['maxCount'] = $counter + (($maxItems < $queuedMessages) ? $maxItems : $queuedMessages);
$loop = true; // loop mode!!
}
else if ($queuedMessages == 0) {
......@@ -758,7 +758,7 @@ class LoopDetection extends InterProcessData {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("LoopDetection->Detect(): case 3.3.1 detected - broken item should be next, attempt to ignore it - id '%s'", $current['potential']));
$this->ignore_messageid = $current['potential'];
}
$current['maxCount'] = $counter + $queuedMessages;
$current['maxCount'] = $counter + (($maxItems < $queuedMessages) ? $maxItems : $queuedMessages);
$loop = true; // loop mode!!
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment