]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiXSearch.pm
lei: keep $lei around until workers are reaped
[public-inbox.git] / lib / PublicInbox / LeiXSearch.pm
index de82a7daee1d4b5a20227e3f4819bc69d330cacb..b4a9b89dc169f9f9f2a0f132cfb8b32c91c8ef52 100644 (file)
@@ -283,7 +283,7 @@ sub query_done { # EOF callback
        my $has_l2m = exists $lei->{l2m};
        for my $f (qw(lxs l2m)) {
                my $wq = delete $lei->{$f} or next;
-               $wq->wq_wait_old;
+               $wq->wq_wait_old($lei);
        }
        $lei->{ovv}->ovv_end($lei);
        if ($has_l2m) { # close() calls LeiToMail reap_compress
@@ -359,7 +359,7 @@ sub sigpipe_handler { # handles SIGPIPE from l2m/lxs workers
        my ($lei) = @_;
        my $lxs = delete $lei->{lxs};
        if ($lxs && $lxs->wq_kill_old) { # is this the daemon?
-               $lxs->wq_wait_old;
+               $lxs->wq_wait_old($lei);
        }
        close(delete $lei->{1}) if $lei->{1};
        $lei->x_it(13);