about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-09-02 21:00:50 +0000
committerEric Wong <e@80x24.org>2016-09-02 21:00:50 +0000
commit932a70dfd2ea3e8ae7eca5fac680c2ad0a17c46d (patch)
tree8b342ba08811c9d87c5cef3f8406c93cf5273436
parent790d4f6306d3716e311ce3c141a7666e4f0cd74d (diff)
downloadpublic-inbox-932a70dfd2ea3e8ae7eca5fac680c2ad0a17c46d.tar.gz
Just having "limiter" in the prefix may confuse
it with something else.  Use the full prefix to
avoid this confusion.
-rw-r--r--lib/PublicInbox/Config.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm
index 5adcd0cc..8d66cf8c 100644
--- a/lib/PublicInbox/Config.pm
+++ b/lib/PublicInbox/Config.pm
@@ -90,8 +90,12 @@ sub limiter {
         my ($self, $name) = @_;
         $self->{-limiters}->{$name} ||= do {
                 require PublicInbox::Qspawn;
-                my $key = "limiter.$name.max";
-                PublicInbox::Qspawn::Limiter->new($self->{$key});
+                my $max;
+                # XXX "limiter.<name>.max" was a historical mistake
+                foreach my $pfx (qw(publicinboxlimiter limiter)) {
+                        $max ||= $self->{"$pfx.$name.max"};
+                }
+                PublicInbox::Qspawn::Limiter->new($max);
         };
 }