diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-06-09 12:55:20 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-06-09 12:55:20 +0100 |
commit | 45f223de8f3509b1cefa68cad659d373676a0841 (patch) | |
tree | b5ecb901c337c6154513fc76c6d2d3cec8b58a4b /src/rspamd.c | |
parent | f1d44f1b36c2f6767cbace2aeba7d84a0a99d1f0 (diff) | |
download | rspamd-45f223de8f3509b1cefa68cad659d373676a0841.tar.gz rspamd-45f223de8f3509b1cefa68cad659d373676a0841.zip |
[Minor] Close sockets that do not belong to a current worker
Diffstat (limited to 'src/rspamd.c')
-rw-r--r-- | src/rspamd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rspamd.c b/src/rspamd.c index dd47956a2..ff9ecfa88 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -373,7 +373,7 @@ rspamd_fork_delayed_cb (EV_P_ ev_timer *w, int revents) rspamd_fork_worker (waiting_worker->rspamd_main, waiting_worker->cf, waiting_worker->oldindex, waiting_worker->rspamd_main->event_loop, - rspamd_cld_handler); + rspamd_cld_handler, listen_sockets); REF_RELEASE (waiting_worker->cf); g_free (waiting_worker); } @@ -612,15 +612,17 @@ spawn_worker_type (struct rspamd_main *rspamd_main, struct ev_loop *event_loop, "cannot spawn more than 1 %s worker, so spawn one", cf->worker->name); } - rspamd_fork_worker (rspamd_main, cf, 0, event_loop, rspamd_cld_handler); + rspamd_fork_worker (rspamd_main, cf, 0, event_loop, rspamd_cld_handler, + listen_sockets); } else if (cf->worker->flags & RSPAMD_WORKER_THREADED) { - rspamd_fork_worker (rspamd_main, cf, 0, event_loop, rspamd_cld_handler); + rspamd_fork_worker (rspamd_main, cf, 0, event_loop, rspamd_cld_handler, + listen_sockets); } else { for (i = 0; i < cf->count; i++) { rspamd_fork_worker (rspamd_main, cf, i, event_loop, - rspamd_cld_handler); + rspamd_cld_handler, listen_sockets); } } } |