# killing again terminates immediately:
exit unless @listeners;
+ $_->close foreach @listeners; # call Danga::Socket::close
@listeners = ();
# give slow clients 30s to finish reading/writing whatever
$SIG{USR1} = *reopen_logs;
$SIG{HUP} = $refresh;
# this calls epoll_create:
- PublicInbox::Listener->new($_, $post_accept) for @listeners;
+ @listeners = map {
+ PublicInbox::Listener->new($_, $post_accept)
+ } @listeners;
Danga::Socket->EventLoop;
$parent_pipe = undef;
}