]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
no bug - use more obvious looping construct
authorDylan William Hardison <dylan@hardison.net>
Fri, 6 Jul 2018 03:40:11 +0000 (23:40 -0400)
committerGitHub <noreply@github.com>
Fri, 6 Jul 2018 03:40:11 +0000 (23:40 -0400)
Bugzilla/Memcached.pm

index f3272c194bbb0a34fe0d9ec1882360e79e7bb1d2..40755aa29a9893df6c0ea9aeff6c7408c4cf43f3 100644 (file)
@@ -230,9 +230,9 @@ sub should_rate_limit {
     return 0 unless $name;
     return 0 unless $memcached;
 
-    $tries //= 3;
+    $tries //= 4;
 
-    for my $try (0 .. $tries) {
+    for my $try (1 .. $tries) {
         my $now = time;
         my ($key, @keys) = map { $prefix . ( $now - $_ ) } 0 .. $rate_seconds;
         $memcached->add($key, 0, $rate_seconds+1);