summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-01 14:10:37 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-01 14:10:37 +0000
commitc47ebdf8c847234b954184147748ce109546eeab (patch)
treee95d2e2aa76973828d8d0f4158c9b0fe1f9fbdb5
parentfe0b31d91e4228f4b3ff1a3b5b26c34954528de2 (diff)
downloadrspamd-c47ebdf8c847234b954184147748ce109546eeab.tar.gz
rspamd-c47ebdf8c847234b954184147748ce109546eeab.zip
[Fix] Do not reset loaded ANN when learning is requested
-rw-r--r--src/plugins/lua/fann_redis.lua2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/plugins/lua/fann_redis.lua b/src/plugins/lua/fann_redis.lua
index 5b67a0b58..a7f8aa606 100644
--- a/src/plugins/lua/fann_redis.lua
+++ b/src/plugins/lua/fann_redis.lua
@@ -304,10 +304,8 @@ local function create_train_fann(n, id)
rspamd_logger.infox(rspamd_config, 'recreate ANN %s, version %s', id,
fanns[id].version)
fanns[id].fann_train = rspamd_fann.create(nlayers, n, n / 2, n / 4, 1)
- fanns[id].fann = nil
else
fanns[id].fann_train = fanns[id].fann
- fanns[id].fann = nil
end
else
fanns[id].fann_train = rspamd_fann.create(nlayers, n, n / 2, n / 4, 1)