projects
/
pmg-api.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d72a6e0
)
do not use 'last' inside do/while
author
Dietmar Maurer
<dietmar@proxmox.com>
Wed, 3 Oct 2018 10:12:29 +0000
(12:12 +0200)
committer
Dietmar Maurer
<dietmar@proxmox.com>
Wed, 3 Oct 2018 10:12:29 +0000
(12:12 +0200)
Because this raises an exception.
PMG/Cluster.pm
patch
|
blob
|
blame
|
history
diff --git
a/PMG/Cluster.pm
b/PMG/Cluster.pm
index 5eb41b5046ae001aa2177086680f4f857c8a58e7..9e456f16e4b9f3690b8681f424a7e0ec2de1bc9f 100644
(file)
--- 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;
}