From: Michael Tremer Date: Mon, 8 Feb 2021 11:53:48 +0000 (+0000) Subject: Include number of listening sockets in open file limit X-Git-Tag: 0.2.0~19 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=700be72563ab87c40607169db9e508b986466736;p=fireperf.git Include number of listening sockets in open file limit Signed-off-by: Michael Tremer --- diff --git a/src/main.c b/src/main.c index 1e1f808..215c69c 100644 --- a/src/main.c +++ b/src/main.c @@ -110,7 +110,7 @@ static int set_limits(struct fireperf_config* conf) { struct rlimit limit; // Increase limit of open files - limit.rlim_cur = limit.rlim_max = conf->parallel + 128; + limit.rlim_cur = limit.rlim_max = conf->parallel + conf->listening_sockets + 128; int r = setrlimit(RLIMIT_NOFILE, &limit); if (r) {