]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Do not open sockets for disabled workers
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 14 May 2018 16:44:41 +0000 (17:44 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 14 May 2018 16:44:41 +0000 (17:44 +0100)
src/rspamd.c

index c22afe861d930cba071cb2e7bb6ca44272e0b85e..ab065a967063802ebaf8bbd77d62a4965d9e3a4d 100644 (file)
@@ -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);