]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
lei: do not issue sto->done if socket is inactive
authorEric Wong <e@80x24.org>
Sat, 7 Oct 2023 21:24:03 +0000 (21:24 +0000)
committerEric Wong <e@80x24.org>
Sun, 8 Oct 2023 18:54:35 +0000 (18:54 +0000)
This fixes attempts to use an undefined value as an ARRAY reference
in PublicInbox::IPC::wq_io_do

lib/PublicInbox/LEI.pm

index f8bcd43d77370308ccb5ce7eb93242c04e6cfd8a..f00b2465c00993ae4105017411f88be6686c8d63 100644 (file)
@@ -1296,7 +1296,7 @@ sub can_stay_alive { # PublicInbox::DS::post_loop_do cb
                        my $lne = delete($cfg->{-lei_note_event});
                        $lne->wq_close if $lne;
                        my $sto = delete($cfg->{-lei_store}) // next;
-                       eval { $sto->wq_io_do('done') };
+                       eval { $sto->wq_do('done') if $sto->{-wq_s1} };
                        warn "E: $@ (dropping store for $cfg->{-f})" if $@;
                        $sto->wq_close;
                }