]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Forgotten in the previous commit
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 16 Feb 2017 13:16:53 +0000 (13:16 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 16 Feb 2017 13:16:53 +0000 (13:16 +0000)
src/worker.c

index 5995911b9ccab6623c691d5ef17f556b8b4e53d3..c611e0c3911607a49c510651d7861f875bf14567 100644 (file)
@@ -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