From 4f4fa052e6caf470632a2e8a8ea5113c97f0ba21 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 22 Feb 2021 00:28:15 +0600 Subject: [PATCH] lei-daemon: prefer graceful shutdowns We'll keep the daemon alive as long as a a script/lei client remains connected. This ought to improve user experience and is in line with what -imapd/-httpd/-nntpd users have expected over the years. --- lib/PublicInbox/LEI.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 0b4bc20e..8d49b212 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -1101,6 +1101,8 @@ sub lazy_start { exit($exit_code // 0); } +sub busy { 1 } # prevent daemon-shutdown if client is connected + # for users w/o Socket::Msghdr installed or Inline::C enabled sub oneshot { my ($main_pkg) = @_; -- 2.44.0