]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
git_http_backend: use default limiter from Qspawn
authorEric Wong <e@80x24.org>
Tue, 28 Jan 2025 08:31:13 +0000 (08:31 +0000)
committerEric Wong <e@80x24.org>
Tue, 4 Feb 2025 09:06:17 +0000 (09:06 +0000)
There's no reason for us to have another default limiter object
when the one in Qspawn already exists.

lib/PublicInbox/GitHTTPBackend.pm

index 5dc07143931d9fecddfe4b981e3d233fe3045a38..172de2bca2843e2ad65d0c10dfa2216457ddaa3a 100644 (file)
@@ -15,9 +15,6 @@ use PublicInbox::Tmpfile;
 use PublicInbox::WwwStatic qw(r @NO_CACHE);
 use Carp ();
 
-# 32 is same as the git-daemon connection limit
-my $default_limiter = PublicInbox::Limiter->new(32);
-
 # n.b. serving "description" and "cloneurl" should be innocuous enough to
 # not cause problems.  serving "config" might...
 my @text = qw[HEAD info/refs info/attributes
@@ -102,8 +99,7 @@ sub serve_smart ($$$;$) {
                $env{$name} = $val if defined $val;
        }
        my $limiter = $git->{-httpbackend_limiter} //
-               ($pi_cfg ? $pi_cfg->limiter('-httpbackend') : undef) //
-               $default_limiter;
+               ($pi_cfg ? $pi_cfg->limiter('-httpbackend') : undef);
        $env{GIT_HTTP_EXPORT_ALL} = '1';
        $env{PATH_TRANSLATED} = "$git->{git_dir}/$path";
        my $rdr = input_prepare($env) or return r(500);