diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-23 16:01:28 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-23 16:01:28 +0000 |
commit | a2230af117444bb66f92c1b7f036e9b226100759 (patch) | |
tree | 19435a0d12a2e2ac967e0029c6ae1c4cbf0564e5 /src | |
parent | 64205e24d42f4c9a19ed48579141f619aa792c74 (diff) | |
download | rspamd-a2230af117444bb66f92c1b7f036e9b226100759.tar.gz rspamd-a2230af117444bb66f92c1b7f036e9b226100759.zip |
[Rework] Re cache: Load compiled hyperscan in the main process as well
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/rspamd_control.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c index cb2efecb9..1bb4ac4d6 100644 --- a/src/libserver/rspamd_control.c +++ b/src/libserver/rspamd_control.c @@ -904,6 +904,14 @@ rspamd_srv_handler (EV_P_ ev_io *w, int revents) } break; case RSPAMD_SRV_HYPERSCAN_LOADED: + /* Load RE cache to provide it for new forks */ + if (rspamd_re_cache_is_hs_loaded (srv->cfg->re_cache) != RSPAMD_HYPERSCAN_LOADED_FULL || + cmd.cmd.hs_loaded.forced) { + rspamd_re_cache_load_hyperscan ( + srv->cfg->re_cache, + cmd.cmd.hs_loaded.cache_dir); + } + /* Broadcast command to all workers */ memset (&wcmd, 0, sizeof (wcmd)); wcmd.type = RSPAMD_CONTROL_HYPERSCAN_LOADED; |