]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei_mirror: fix circular reference
authorEric Wong <e@80x24.org>
Wed, 24 Mar 2021 09:23:34 +0000 (14:23 +0500)
committerEric Wong <e@80x24.org>
Wed, 24 Mar 2021 23:01:21 +0000 (23:01 +0000)
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

index 6e62625d73502d6eb881aae49ec28e86a3505193..d68cd6c1615cea67c4577d76e60588a83d288eb4 100644 (file)
@@ -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;