From a1539672716f91acc67397a1a7d16e99df068931 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 21 Jul 2021 14:07:06 +0000 Subject: lei: auto-refresh watches in config, cancel missing This makes behavior less surprising on restarts as we no longer lose state on restarts, so there's no need to manually run "lei add-watch" to re-enable watches. This also allows us to transparently handle changes if somebody edits the lei config file directly or via git-config(1). --- lib/PublicInbox/LeiNoteEvent.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/LeiNoteEvent.pm') diff --git a/lib/PublicInbox/LeiNoteEvent.pm b/lib/PublicInbox/LeiNoteEvent.pm index bf15cd26..d6511cf6 100644 --- a/lib/PublicInbox/LeiNoteEvent.pm +++ b/lib/PublicInbox/LeiNoteEvent.pm @@ -14,7 +14,7 @@ sub flush_lei ($) { my ($lei) = @_; if (my $lne = delete $lei->{cfg}->{-lei_note_event}) { $lne->wq_close(1, undef, $lei); # runs _lei_wq_eof; - } else { # lms_clear_src calls only: + } elsif ($lei->{sto}) { # lms_clear_src calls only: my $wait = $lei->{sto}->ipc_do('done'); } } -- cgit v1.2.3-24-ge0c7