diff options
author | Eric Wong <e@yhbt.net> | 2020-01-09 11:14:50 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-01-09 11:23:31 +0000 |
commit | cb4f09264abe20c820939814e87442fe812713bc (patch) | |
tree | 3246d7b3fc47da2c5b7bdf7fb08888fa5e79212e /lib | |
parent | bfdf6728f442385f596175b261877ead1b37f9f6 (diff) | |
download | public-inbox-cb4f09264abe20c820939814e87442fe812713bc.tar.gz |
EPOLL_CTL_ADD may fail with transient ENOMEM or ENOSPC errors, so don't tear down the process when that happens.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/Listener.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/Listener.pm b/lib/PublicInbox/Listener.pm index 928d9301..cdfd34a2 100644 --- a/lib/PublicInbox/Listener.pm +++ b/lib/PublicInbox/Listener.pm @@ -40,7 +40,8 @@ sub event_step { # 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 |