diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-09-10 14:54:08 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-09-10 14:54:23 +0100 |
commit | d45ec6978fd0a19f172f6a8ead445ba30fc35467 (patch) | |
tree | 47e2ebdd371d4f37b77b2f44f45cee9e02cc658a /src/libstat | |
parent | a33da25ace30767d894f4ea547bf1a9e04460256 (diff) | |
download | rspamd-d45ec6978fd0a19f172f6a8ead445ba30fc35467.tar.gz rspamd-d45ec6978fd0a19f172f6a8ead445ba30fc35467.zip |
[Fix] Fix crashes on task cleanup
Diffstat (limited to 'src/libstat')
-rw-r--r-- | src/libstat/backends/redis_backend.c | 4 | ||||
-rw-r--r-- | src/libstat/learn_cache/redis_cache.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index 5510cff05..7b49db59e 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -1572,7 +1572,7 @@ rspamd_redis_process_tokens (struct rspamd_task *task, gint ret; const gchar *learned_key = "learns"; - if (rspamd_session_is_destroying (task->s)) { + if (rspamd_session_blocked (task->s)) { return FALSE; } @@ -1667,7 +1667,7 @@ rspamd_redis_learn_tokens (struct rspamd_task *task, GPtrArray *tokens, goffset off; const gchar *learned_key = "learns"; - if (rspamd_session_is_destroying (task->s)) { + if (rspamd_session_blocked (task->s)) { return FALSE; } diff --git a/src/libstat/learn_cache/redis_cache.c b/src/libstat/learn_cache/redis_cache.c index e17f20d27..fc928e75e 100644 --- a/src/libstat/learn_cache/redis_cache.c +++ b/src/libstat/learn_cache/redis_cache.c @@ -438,7 +438,7 @@ rspamd_stat_cache_redis_check (struct rspamd_task *task, struct timeval tv; gchar *h; - if (rspamd_session_is_destroying (task->s)) { + if (rspamd_session_blocked (task->s)) { return RSPAMD_LEARN_INGORE; } @@ -473,7 +473,7 @@ rspamd_stat_cache_redis_learn (struct rspamd_task *task, gchar *h; gint flag; - if (rspamd_session_is_destroying (task->s)) { + if (rspamd_session_blocked (task->s)) { return RSPAMD_LEARN_INGORE; } |