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.
}
umask(077) // die("umask(077): $!");
bind($listener, $addr) or die "bind($path): $!";
- listen($listener, 1024) or die "listen: $!";
$lk->lock_release;
undef $lk;
my @st = stat($path) or die "stat($path): $!";
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);
}