]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
qspawn: use limiter->new default
authorEric Wong <e@80x24.org>
Sat, 8 Feb 2025 03:26:36 +0000 (03:26 +0000)
committerEric Wong <e@80x24.org>
Tue, 11 Feb 2025 00:11:41 +0000 (00:11 +0000)
No need to hardcode `32' here since PublicInbox::Limiter already
uses that value already (and includes a helpful comment about
using the same value as git-daemon).

lib/PublicInbox/Qspawn.pm

index cde45b42390ff672a0a0f153c8a6569b7fd44e07..3ceeff2345b0470b334097ed6864a7ae2c59b407 100644 (file)
@@ -172,7 +172,7 @@ sub psgi_qx {
        my ($self, $env, $limiter, @qx_cb_arg) = @_;
        $self->{psgi_env} = $env;
        $self->{qx_cb_arg} = \@qx_cb_arg;
-       $limiter ||= $def_limiter ||= PublicInbox::Limiter->new(32);
+       $limiter ||= $def_limiter ||= PublicInbox::Limiter->new;
        start($self, $limiter, undef);
 }
 
@@ -280,7 +280,7 @@ sub psgi_yield {
        my ($self, $env, $limiter, @parse_hdr_arg)= @_;
        $self->{psgi_env} = $env;
        $self->{yield_parse_hdr} = [ \(my $buf = ''), @parse_hdr_arg ];
-       $limiter ||= $def_limiter ||= PublicInbox::Limiter->new(32);
+       $limiter ||= $def_limiter ||= PublicInbox::Limiter->new;
 
        # the caller already captured the PSGI write callback from
        # the PSGI server, so we can call ->start, here: