aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
+ }
}
}