EPOLL_CTL_ADD may fail with transient ENOMEM or ENOSPC errors,
so don't tear down the process when that happens.
# on high-traffic sites.
if (my $addr = accept(my $c, $sock)) {
IO::Handle::blocking($c, 0); # no accept4 :<
- $self->{post_accept}->($c, $addr, $sock);
+ eval { $self->{post_accept}->($c, $addr, $sock) };
+ warn "E: $@\n" if $@;
$self->requeue;
} elsif ($! == EAGAIN || $! == ECONNABORTED || $! == EPERM) {
# EAGAIN is common and likely