diff options
author | Eric Wong <e@80x24.org> | 2021-07-28 00:37:19 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-07-28 05:16:34 +0000 |
commit | f72e56e40eb41e720fb4dfefc4cd9a8e50971fe7 (patch) | |
tree | 4e0a0685e594d2c28149d86aa3fd71085e77072d /lib/PublicInbox/Listener.pm | |
parent | 88c67b2202295c73f8f682233304daf3867936df (diff) | |
download | public-inbox-f72e56e40eb41e720fb4dfefc4cd9a8e50971fe7.tar.gz |
This helps avoid errors from script/lei dying on ECONNRESET when a single lei-daemon is serving all tests when run via "make check-run". Instead of using some arbitrary limit, use INT_MAX and let the kernel clamp it (both Linux and FreeBSD do). There's no need to call listen() in LEI.pm, either, since Listener->new takes care of it.
Diffstat (limited to 'lib/PublicInbox/Listener.pm')
-rw-r--r-- | lib/PublicInbox/Listener.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Listener.pm b/lib/PublicInbox/Listener.pm index c8315810..64bba5b0 100644 --- a/lib/PublicInbox/Listener.pm +++ b/lib/PublicInbox/Listener.pm @@ -20,7 +20,7 @@ sub new ($$$) { my ($class, $s, $cb) = @_; setsockopt($s, SOL_SOCKET, SO_KEEPALIVE, 1); setsockopt($s, IPPROTO_TCP, TCP_NODELAY, 1); # ignore errors on non-TCP - listen($s, 1024); + listen($s, 2**31 - 1); # kernel will clamp my $self = bless { post_accept => $cb }, $class; $self->SUPER::new($s, EPOLLIN|EPOLLET|EPOLLEXCLUSIVE); } |