From: Eric Wong Date: Tue, 28 Jan 2025 08:31:11 +0000 (+0000) Subject: limiter: ignore unparseable rlimit X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3bc22b2739b50fff8ac436a91ee5bf2814149329;p=thirdparty%2Fpublic-inbox.git limiter: ignore unparseable rlimit Instead of blindly accepting whatever bogus values the config gave us, ignore it and use the `W:' prefix to be consistent with the rest of our codebase. --- diff --git a/lib/PublicInbox/Limiter.pm b/lib/PublicInbox/Limiter.pm index a8d08fc3f..b515de98a 100644 --- a/lib/PublicInbox/Limiter.pm +++ b/lib/PublicInbox/Limiter.pm @@ -29,7 +29,8 @@ sub setup_rlimit { if (scalar(@rlimit) == 1) { push @rlimit, $rlimit[0]; } elsif (scalar(@rlimit) != 2) { - warn "could not parse $k: $v\n"; + warn "W: could not parse $k: $v (ignored)\n"; + next; } my $inf = $v =~ /\binfinity\b/i ? $PublicInbox::Spawn::RLIMITS{RLIM_INFINITY} // eval {