diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-22 12:20:38 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-22 12:20:38 +0100 |
commit | 4a09c608e4ccc7c9c83f54cd938ee0f31e76f0e5 (patch) | |
tree | d07f0e2986d3527dd63af102894986769f941e68 /src | |
parent | 546a54a8275c9e6fd59b1de1c2843bcb0dedf992 (diff) | |
download | rspamd-4a09c608e4ccc7c9c83f54cd938ee0f31e76f0e5.tar.gz rspamd-4a09c608e4ccc7c9c83f54cd938ee0f31e76f0e5.zip |
[Fix] Disable multiple autolearn checks
Issue: #674
Reported by: @moisseev
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/task.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libserver/task.c b/src/libserver/task.c index f8ebe81f1..0f954ad34 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -604,7 +604,8 @@ rspamd_task_process (struct rspamd_task *task, guint stages) case RSPAMD_TASK_STAGE_POST_FILTERS: rspamd_lua_call_post_filters (task); if ((task->flags & RSPAMD_TASK_FLAG_LEARN_AUTO) && - !RSPAMD_TASK_IS_EMPTY (task)) { + !RSPAMD_TASK_IS_EMPTY (task) && + !(task->flags & (RSPAMD_TASK_FLAG_LEARN_SPAM|RSPAMD_TASK_FLAG_LEARN_HAM))) { rspamd_stat_check_autolearn (task); } break; @@ -622,6 +623,9 @@ rspamd_task_process (struct rspamd_task *task, guint stages) if (!(task->flags & RSPAMD_TASK_FLAG_LEARN_AUTO)) { task->err = stat_error; } + else if (stat_error) { + g_error_free (stat_error); + } msg_err_task ("learn error: %e", stat_error); task->processed_stages |= RSPAMD_TASK_STAGE_DONE; |