unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] inbox: name variable for values loop iterator
@ 2020-12-26  8:12 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-12-26  8:12 UTC (permalink / raw)
  To: meta

->on_inbox_unlock callbacks could clobber $_, and this seems to
fix a problem with -extindex --watch failing to index some
inboxes after SIGHUP reload.
---
 lib/PublicInbox/Inbox.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index ec8469e3..1b9b56ff 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -414,8 +414,8 @@ sub on_unlock {
 	my ($self) = @_;
 	check_inodes($self);
 	my $subs = $self->{unlock_subs} or return;
-	for (values %$subs) {
-		eval { $_->on_inbox_unlock($self) };
+	for my $obj (values %$subs) {
+		eval { $obj->on_inbox_unlock($self) };
 		warn "E: $@ ($self->{inboxdir})\n" if $@;
 	}
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-26  8:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-26  8:12 [PATCH] inbox: name variable for values loop iterator Eric Wong

unofficial mirror of meta@public-inbox.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://yhetil.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.public-inbox.meta
	nntp://news.public-inbox.org/inbox.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git