about summary refs log tree commit homepage
path: root/lib/PublicInbox/LEI.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-25 22:38:19 -0700
committerEric Wong <e@80x24.org>2021-09-26 08:19:19 +0000
commit6b941fd4a98be259c9cf4edbb23fe1a01053fab7 (patch)
tree4c6a0b344edfaacfd4bfb76dfb5b0ab1199b3f48 /lib/PublicInbox/LEI.pm
parent7bb5328616c477c269edfac89d0388e2f36cf96f (diff)
downloadpublic-inbox-6b941fd4a98be259c9cf4edbb23fe1a01053fab7.tar.gz
Only the top-level lei-daemon will do inotify/kevent.
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r--lib/PublicInbox/LEI.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index a337fb0d..8faf74a2 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -578,6 +578,7 @@ sub _lei_atfork_child {
         close $listener if $listener;
         undef $listener;
         $dir_idle->force_close if $dir_idle;
+        undef $dir_idle;
         %PATH2CFG = ();
         $MDIR2CFGPATH = {};
         eval 'no warnings; undef $PublicInbox::LeiNoteEvent::to_flush';
@@ -1413,6 +1414,7 @@ sub add_maildir_watch ($$) {
 
 sub refresh_watches {
         my ($lei) = @_;
+        $dir_idle or return;
         my $cfg = _lei_cfg($lei) or return;
         my $old = $cfg->{-watches};
         my $watches = $cfg->{-watches} //= {};