From 838f5d1a45addc643ddf23d1da9ee43816a8140c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 8 Feb 2025 03:26:36 +0000 Subject: [PATCH] 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). --- lib/PublicInbox/Qspawn.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 2.47.3