]> source.dussan.org Git - rspamd.git/commitdiff
Limit number of file descriptors opened by nftw
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 16 Dec 2015 18:08:09 +0000 (18:08 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 16 Dec 2015 18:08:09 +0000 (18:08 +0000)
src/rspamd.c

index 57a7648d65c6e1579386db31a08a6bccc6a3d784..3137bb3d75eb9a1da0e3f7044d8c4a49ab2f26b3 100644 (file)
@@ -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));