We'll be using these in a more OO manner for V2Writable
(which doesn't use Danga::Socket), so lets not unnecessarily
register cleanup handlers intended for network daemons.
@listeners = map {
PublicInbox::Listener->new($_, $post_accept)
} @listeners;
+ $PublicInbox::EvCleanup::ENABLED = 1;
Danga::Socket->EventLoop;
$parent_pipe = undef;
}
use warnings;
use base qw(Danga::Socket);
use fields qw(rd);
+
+our $ENABLED;
my $singleton;
my $asapq = [ [], undef ];
my $nextq = [ [], undef ];
sub _cleanup_later ($) {
my ($self) = @_;
+ return unless $PublicInbox::EvCleanup::ENABLED;
$cleanup_timer ||= PublicInbox::EvCleanup::later(*cleanup_task);
$CLEANUP->{"$self"} = $self;
}