From b4ec4142b790eedc7d8e8ddb5e6457e63c425301 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 14 May 2018 17:44:41 +0100 Subject: [PATCH] [Fix] Do not open sockets for disabled workers --- src/rspamd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rspamd.c b/src/rspamd.c index c22afe861..ab065a967 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -557,7 +557,7 @@ spawn_workers (struct rspamd_main *rspamd_main, struct event_base *ev_base) msg_err_main ("type of worker is unspecified, skip spawning"); } else { - if (!cf->enabled) { + if (!cf->enabled || cf->count <= 0) { msg_info_main ("worker of type %s is disabled in the config, " "skip spawning", g_quark_to_string (cf->type)); cur = g_list_next (cur); -- 2.39.5