ENOENT on epoll_ctl(2) is always a sign of buggy code and it
makes sense to dump the backtrace by default, here. I've only
noticed this failure on HTTPS connections.
use PublicInbox::Select;
use PublicInbox::OnDestroy;
use Errno qw(EAGAIN EINVAL ECHILD);
-use Carp qw(carp croak);
+use Carp qw(carp croak confess);
use List::Util qw(sum);
our @EXPORT_OK = qw(now msg_more awaitpid add_timer add_uniq_timer);
my $sendmsg_more = PublicInbox::Syscall->can('sendmsg_more');
sub epwait ($$) {
my ($io, $ev) = @_;
- $Poller and $Poller->ep_mod($io, $ev) and croak "EPOLL_CTL_MOD $io: $!";
+ $Poller and $Poller->ep_mod($io, $ev) and confess "BUG: ep_mod $io: $!";
}
# returns 1 if done, 0 if incomplete