aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-05-13 14:41:51 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-05-13 14:41:51 +0100
commitfc7fa45e5a7187d5a4c5c5bcfc1be27de75fd59a (patch)
tree04acbfa5d32b1505a7f123b5df548af48846635c /src/main.c
parentd7941731d1f63381c791e1e306cefc1eba732517 (diff)
downloadrspamd-fc7fa45e5a7187d5a4c5c5bcfc1be27de75fd59a.tar.gz
rspamd-fc7fa45e5a7187d5a4c5c5bcfc1be27de75fd59a.zip
Fix SIGHUP endless loop.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 728134132..83c072ccf 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);
+ }
}
}