From: Eric Wong Date: Sat, 8 Feb 2025 03:26:36 +0000 (+0000) Subject: qspawn: use limiter->new default X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=838f5d1a45addc643ddf23d1da9ee43816a8140c;p=thirdparty%2Fpublic-inbox.git qspawn: use limiter->new default 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). --- diff --git a/lib/PublicInbox/Qspawn.pm b/lib/PublicInbox/Qspawn.pm index cde45b423..3ceeff234 100644 --- a/lib/PublicInbox/Qspawn.pm +++ b/lib/PublicInbox/Qspawn.pm @@ -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: