diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-28 12:34:27 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-28 12:34:49 +0000 |
commit | 26d6ee991131d43edf89d4d34077187527be8562 (patch) | |
tree | f13ed1ed5ff018dc4ca3e2ed00178889f4419be0 /src/worker.c | |
parent | 902ebce8b6c60a0a1cc1501c6da1ada1d2b2b4a5 (diff) | |
download | rspamd-26d6ee991131d43edf89d4d34077187527be8562.tar.gz rspamd-26d6ee991131d43edf89d4d34077187527be8562.zip |
[Fix] Fix usage of config during reload
Diffstat (limited to 'src/worker.c')
-rw-r--r-- | src/worker.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/worker.c b/src/worker.c index fcb9d9fe3..df772feb5 100644 --- a/src/worker.c +++ b/src/worker.c @@ -597,6 +597,8 @@ start_worker (struct rspamd_worker *worker) struct rspamd_worker_ctx *ctx = worker->ctx; struct rspamd_worker_log_pipe *lp, *ltmp; + ctx->cfg = worker->srv->cfg; + REF_RETAIN (ctx->cfg); ctx->ev_base = rspamd_prepare_worker (worker, "normal", accept_socket, TRUE); msec_to_tv (ctx->timeout, &ctx->io_tv); rspamd_symbols_cache_start_refresh (worker->srv->cfg->cache, ctx->ev_base); @@ -646,5 +648,7 @@ start_worker (struct rspamd_worker *worker) g_slice_free1 (sizeof (*lp), lp); } + REF_RELEASE (ctx->cfg); + exit (EXIT_SUCCESS); } |