diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-02-16 13:16:53 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-02-16 13:16:53 +0000 |
commit | a21784ce0dc6c66deeb85e50d612ae29df566a78 (patch) | |
tree | 7e12b8d6bef53f1af5ce2aa16a81c187c6584506 /src/worker.c | |
parent | dd2a849dbb5349c3412395d0a8eb0334b8b4a07e (diff) | |
download | rspamd-a21784ce0dc6c66deeb85e50d612ae29df566a78.tar.gz rspamd-a21784ce0dc6c66deeb85e50d612ae29df566a78.zip |
[Minor] Forgotten in the previous commit
Diffstat (limited to 'src/worker.c')
-rw-r--r-- | src/worker.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/worker.c b/src/worker.c index 5995911b9..c611e0c39 100644 --- a/src/worker.c +++ b/src/worker.c @@ -80,11 +80,15 @@ rspamd_worker_finalize (gpointer user_data) struct rspamd_task *task = user_data; struct timeval tv = {.tv_sec = 0, .tv_usec = 0}; - msg_info_task ("finishing actions has been processed, terminating"); - event_base_loopexit (task->ev_base, &tv); - rspamd_session_destroy (task->s); + if (!(task->flags & RSPAMD_TASK_FLAG_PROCESSING)) { + msg_info_task ("finishing actions has been processed, terminating"); + event_base_loopexit (task->ev_base, &tv); + rspamd_session_destroy (task->s); - return TRUE; + return TRUE; + } + + return FALSE; } static gboolean |