]> source.dussan.org Git - 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 14:10:15 +0000 (15:10 +0100)
src/main.c

index 1cb641cda86fbbe5121be18c3990142241133689..23129f2a02a9eecf6afa421390770fb680fd32e6 100644 (file)
@@ -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);
+                                       }
                                }
                        }