From d4c2f64630603ed06ecc9f2c639e1f916ce62a66 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 3 Oct 2018 12:12:29 +0200 Subject: [PATCH] do not use 'last' inside do/while Because this raises an exception. --- PMG/Cluster.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/PMG/Cluster.pm b/PMG/Cluster.pm index 5eb41b5..9e456f1 100644 --- a/PMG/Cluster.pm +++ b/PMG/Cluster.pm @@ -589,9 +589,7 @@ sub sync_quarantine_db { $mscount += $count; - last if $mscount >= $maxmails; - - } while ($count >= $maxcount); + } while (($count >= $maxcount) && ($mscount < $maxmails)); PMG::DBTools::create_clusterinfo_default($ldb, $rcid, 'lastmt_CMSReceivers', 0, undef); @@ -689,9 +687,7 @@ sub sync_statistic_db { $mscount += $count; - last if $mscount >= $maxmails; - - } while ($count >= $maxcount); + } while (($count >= $maxcount) && ($mscount < $maxmails)); return $mscount; } -- 2.39.2