about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/Daemon.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm
index 43ef2691..3d582e35 100644
--- a/lib/PublicInbox/Daemon.pm
+++ b/lib/PublicInbox/Daemon.pm
@@ -403,6 +403,9 @@ sub upgrade { # $_[0] = signal name or number (unused)
                 $ENV{LISTEN_FDS} = scalar @listeners;
                 $ENV{LISTEN_PID} = $$;
                 foreach my $s (@listeners) {
+                        # @listeners are globs with workers, PI::L w/o workers
+                        $s = $s->{sock} if ref($s) eq 'PublicInbox::Listener';
+
                         my $fl = fcntl($s, F_GETFD, 0);
                         fcntl($s, F_SETFD, $fl &= ~FD_CLOEXEC);
                 }