From: Vsevolod Stakhov Date: Tue, 13 May 2014 13:41:51 +0000 (+0100) Subject: Fix SIGHUP endless loop. X-Git-Tag: 0.6.10~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=677fa47fe183cb451eb5249ff69bc5d71918656f;p=thirdparty%2Frspamd.git Fix SIGHUP endless loop. --- diff --git a/src/main.c b/src/main.c index 1cb641cda8..23129f2a02 100644 --- a/src/main.c +++ b/src/main.c @@ -610,7 +610,10 @@ spawn_workers (struct rspamd_main *rspamd) /* We had socket for this type of worker */ ls = p; } - cf->listen_socks = g_list_concat (cf->listen_socks, ls); + /* Do not add existing lists as it causes loops */ + if (g_list_position (cf->listen_socks, ls) == -1) { + cf->listen_socks = g_list_concat (cf->listen_socks, ls); + } } }