about summary refs log tree commit homepage
path: root/lib/PublicInbox/Daemon.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-28 18:55:09 +0000
committerEric Wong <e@80x24.org>2019-06-29 19:59:00 +0000
commit945ef964037cbac81bf8fdea269037098da094f9 (patch)
treed7c6320aa7796fe3ec482b788d1c22a86db8c4d2 /lib/PublicInbox/Daemon.pm
parent7344d5bb292a29b52b574dfb09542e3290430afd (diff)
downloadpublic-inbox-945ef964037cbac81bf8fdea269037098da094f9.tar.gz
parentpipe: make the ->close call more obvious
We can close directly in event_step without bad side effects,
and then we also don't need to take a reason arg from worker_quit,
since we weren't logging it anywhere.
Diffstat (limited to 'lib/PublicInbox/Daemon.pm')
-rw-r--r--lib/PublicInbox/Daemon.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm
index cf011a20..2b7ac266 100644
--- a/lib/PublicInbox/Daemon.pm
+++ b/lib/PublicInbox/Daemon.pm
@@ -252,13 +252,11 @@ sub daemonize () {
 
 
 sub worker_quit {
-        my ($reason) = @_;
         # killing again terminates immediately:
         exit unless @listeners;
 
         $_->close foreach @listeners; # call PublicInbox::DS::close
         @listeners = ();
-        $reason->close if ref($reason) eq 'PublicInbox::ParentPipe';
 
         my $proc_name;
         my $warn = 0;
@@ -590,7 +588,7 @@ sub daemon_loop ($$$$) {
         } else {
                 reopen_logs();
                 $set_user->() if $set_user;
-                $SIG{USR2} = sub { worker_quit('USR2') if upgrade() };
+                $SIG{USR2} = sub { worker_quit() if upgrade() };
                 $refresh->();
         }
         $uid = $gid = undef;