unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 3/3] git_http_backend: use default limiter from Qspawn
Date: Tue, 28 Jan 2025 08:31:13 +0000	[thread overview]
Message-ID: <20250128083113.1773883-4-e@80x24.org> (raw)
In-Reply-To: <20250128083113.1773883-1-e@80x24.org>

There's no reason for us to have another default limiter object
when the one in Qspawn already exists.
---
 lib/PublicInbox/GitHTTPBackend.pm | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm
index 5dc07143..172de2bc 100644
--- a/lib/PublicInbox/GitHTTPBackend.pm
+++ b/lib/PublicInbox/GitHTTPBackend.pm
@@ -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);

      parent reply	other threads:[~2025-01-28  8:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28  8:31 [PATCH 0/3] limiter updates Eric Wong
2025-01-28  8:31 ` [PATCH 1/3] limiter: ignore unparseable rlimit Eric Wong
2025-01-28  8:31 ` [PATCH 2/3] www: configurable "-httpbackend" named limiter Eric Wong
2025-01-28  8:31 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250128083113.1773883-4-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).