From: Eric Wong Date: Wed, 24 Mar 2021 09:23:34 +0000 (+0500) Subject: lei_mirror: fix circular reference X-Git-Tag: v1.7.0~914 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=636604567b8ff6118c5fcf25e2912a50e0050ca2;p=public-inbox.git 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. --- 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;