about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-02-22 00:28:15 +0600
committerEric Wong <e@80x24.org>2021-02-22 00:52:32 +0000
commit4f4fa052e6caf470632a2e8a8ea5113c97f0ba21 (patch)
tree203555d423505848190631a4d6358024f66822eb
parent8b1d71e9911b950837d795b005b479bbe3301fb9 (diff)
downloadpublic-inbox-4f4fa052e6caf470632a2e8a8ea5113c97f0ba21.tar.gz
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.
-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 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) = @_;