summaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-11 15:30:12 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-11 15:30:30 +0000
commit3c4d37339225ea645f0385aeee1b86238ec41f7c (patch)
treef3bf673a02d9ead6eac7fe5ffeebf5e924282bac /src/rspamd_proxy.c
parent63800059e8dacc1ba69b623719c21355a77301c5 (diff)
downloadrspamd-3c4d37339225ea645f0385aeee1b86238ec41f7c.tar.gz
rspamd-3c4d37339225ea645f0385aeee1b86238ec41f7c.zip
[Feature] Allow to limit maps per specific worker
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r--src/rspamd_proxy.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index 737fff608..ae51e3e5b 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -2297,8 +2297,14 @@ start_rspamd_proxy (struct rspamd_worker *worker)
rspamd_worker_init_controller (worker, NULL);
}
else {
- rspamd_map_watch (worker->srv->cfg, ctx->event_loop, ctx->resolver,
- worker, 0);
+ if (ctx->has_self_scan) {
+ rspamd_map_watch (worker->srv->cfg, ctx->event_loop, ctx->resolver,
+ worker, RSPAMD_MAP_WATCH_SCANNER);
+ }
+ else {
+ rspamd_map_watch (worker->srv->cfg, ctx->event_loop, ctx->resolver,
+ worker, RSPAMD_MAP_WATCH_WORKER);
+ }
}
rspamd_lua_run_postloads (ctx->cfg->lua_state, ctx->cfg, ctx->event_loop,