From: Vsevolod Stakhov Date: Tue, 13 May 2014 13:41:51 +0000 (+0100) Subject: Fix SIGHUP endless loop. X-Git-Tag: 0.7.0~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc7fa45e5a7187d5a4c5c5bcfc1be27de75fd59a;p=thirdparty%2Frspamd.git Fix SIGHUP endless loop. --- diff --git a/src/main.c b/src/main.c index 7281341328..83c072ccfe 100644 --- a/src/main.c +++ b/src/main.c @@ -658,7 +658,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); + } } }