diff options
author | Eric Wong <e@80x24.org> | 2023-10-04 03:49:17 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-04 17:46:33 +0000 |
commit | 398392e62ae4790f28b74ff92494a906061c837f (patch) | |
tree | 63cebb059c257a5d9d91660c61eb85b722678b0a /lib/PublicInbox/LEI.pm | |
parent | 4b3e8437ecf20493e601a30cbbb8ea1ce73deb82 (diff) | |
download | public-inbox-398392e62ae4790f28b74ff92494a906061c837f.tar.gz |
We don't want FS activity to delay lei-daemon shutdown.
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 74a7f5b9..8362800d 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -1285,8 +1285,11 @@ sub can_stay_alive { # PublicInbox::DS::post_loop_do cb } return 1 if defined($$path); my $n = PublicInbox::DS::close_non_busy() or do { + eval 'PublicInbox::LeiNoteEvent::flush_task()'; # drop stores only if no clients for my $cfg (values %PATH2CFG) { + 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') }; warn "E: $@ (dropping store for $cfg->{-f})" if $@; @@ -1346,6 +1349,8 @@ sub lazy_start { my (undef, $eof_p) = PublicInbox::PktOp->pair; sub { $exit_code //= eval("POSIX::SIG$_[0] + 128") if @_; + $dir_idle->close if $dir_idle; # EPOLL_CTL_DEL + $dir_idle = undef; # let RC take care of it eval 'PublicInbox::LeiNoteEvent::flush_task()'; my $lis = $pil or exit($exit_code // 0); # closing eof_p triggers \&noop wakeup |