From: Vsevolod Stakhov Date: Wed, 16 Dec 2015 18:08:09 +0000 (+0000) Subject: Limit number of file descriptors opened by nftw X-Git-Tag: 1.1.0~268 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=18ee02fee1a51478f4aee621a8297442540f8529;p=rspamd.git Limit number of file descriptors opened by nftw --- diff --git a/src/rspamd.c b/src/rspamd.c index 57a7648d6..3137bb3d7 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -649,7 +649,7 @@ rspamd_check_core_limits (struct rspamd_main *rspamd_main) cores_cbdata.total_size = 0; if (cfg->cores_dir && (cfg->max_cores_count || cfg->max_cores_size)) { - if (nftw (cfg->cores_dir, rspamd_check_core_cb, 20, FTW_MOUNT|FTW_PHYS) + if (nftw (cfg->cores_dir, rspamd_check_core_cb, 1, FTW_MOUNT|FTW_PHYS) == -1) { msg_err_main ("nftw failed for path %s: %s", cfg->cores_dir, strerror (errno));