]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix SIGHUP endless loop.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 13 May 2014 13:41:51 +0000 (14:41 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 13 May 2014 13:41:51 +0000 (14:41 +0100)
src/main.c

index 728134132883442b1552adbbbef29a3a064d82a8..83c072ccfeb8dc32fc4cd76a944f97490402680c 100644 (file)
@@ -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);
+                                       }
                                }
                        }