diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-16 15:33:26 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-16 15:33:26 +0100 |
commit | 4f72ad9744deb0141b3ad31722031a98aa5c4a58 (patch) | |
tree | 4010d53b6e8ce0c307c0378eed8429b0045c2c84 | |
parent | c8d46c64001910cae4e393a0fe3a79c2f1c8f64c (diff) | |
download | rspamd-4f72ad9744deb0141b3ad31722031a98aa5c4a58.tar.gz rspamd-4f72ad9744deb0141b3ad31722031a98aa5c4a58.zip |
[Fix] Fix multiple listen configuration
-rw-r--r-- | src/libserver/worker_util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index 89ebc10cb..2d40d057c 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -1056,7 +1056,7 @@ rspamd_handle_child_fork (struct rspamd_worker *wrk, GList *elt = (GList *)v; GList *our = cf->listen_socks; - if (our != elt) { + if (g_list_position (our, elt) == -1) { GList *cur = elt; while (cur) { @@ -1064,7 +1064,10 @@ rspamd_handle_child_fork (struct rspamd_worker *wrk, (struct rspamd_worker_listen_socket *)cur->data; if (ls->fd != -1 && close (ls->fd) == -1) { - msg_err ("cannot close fd %d: %s", ls->fd, strerror (errno)); + msg_err ("cannot close fd %d (addr = %s): %s", + ls->fd, + rspamd_inet_address_to_string_pretty (ls->addr), + strerror (errno)); } cur = g_list_next (cur); |