From 636604567b8ff6118c5fcf25e2912a50e0050ca2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 24 Mar 2021 14:23:34 +0500 Subject: [PATCH] lei_mirror: fix circular reference All of our $lei->workers_start callers can simply rely on that wrapper to do the right thing and pass fields to ->wq_worker_start children, only. This could manifest as a unbound memory growth if somebody is constantly mirroring, and was causing tests to get stuck when experimenting with a persistent lei-daemon for the entire test suite. --- lib/PublicInbox/LeiMirror.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm index 6e62625d..d68cd6c1 100644 --- a/lib/PublicInbox/LeiMirror.pm +++ b/lib/PublicInbox/LeiMirror.pm @@ -268,7 +268,7 @@ sub do_mirror { # via wq_io_do sub start { my ($cls, $lei, $src, $dst) = @_; - my $self = bless { lei => $lei, src => $src, dst => $dst }, $cls; + my $self = bless { src => $src, dst => $dst }, $cls; if ($src =~ m!https?://!) { require URI; require PublicInbox::LeiCurl; -- 2.48.1