summaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-28 12:34:27 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-28 12:34:49 +0000
commit26d6ee991131d43edf89d4d34077187527be8562 (patch)
treef13ed1ed5ff018dc4ca3e2ed00178889f4419be0 /src/rspamd_proxy.c
parent902ebce8b6c60a0a1cc1501c6da1ada1d2b2b4a5 (diff)
downloadrspamd-26d6ee991131d43edf89d4d34077187527be8562.tar.gz
rspamd-26d6ee991131d43edf89d4d34077187527be8562.zip
[Fix] Fix usage of config during reload
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r--src/rspamd_proxy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index fc30329a8..9f81bcc99 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -1464,6 +1464,8 @@ start_rspamd_proxy (struct rspamd_worker *worker)
struct rspamd_proxy_ctx *ctx = worker->ctx;
struct timeval rot_tv;
+ ctx->cfg = worker->srv->cfg;
+ REF_RETAIN (ctx->cfg);
ctx->ev_base = rspamd_prepare_worker (worker, "rspamd_proxy",
proxy_accept_socket,
TRUE);
@@ -1499,6 +1501,7 @@ start_rspamd_proxy (struct rspamd_worker *worker)
}
rspamd_keypair_cache_destroy (ctx->keys_cache);
+ REF_RELEASE (ctx->cfg);
exit (EXIT_SUCCESS);
}