aboutsummaryrefslogtreecommitdiffstats
path: root/src/worker.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-29 13:19:14 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-29 13:19:14 +0000
commit34f0b5587e72a7f77425d9faccac8b03b363fdcc (patch)
tree1a03c4c065315bdbdf02f47bfc6c9e64ab90e7d7 /src/worker.c
parent8376bed06ce63da58256c383f1899f17094140d1 (diff)
downloadrspamd-34f0b5587e72a7f77425d9faccac8b03b363fdcc.tar.gz
rspamd-34f0b5587e72a7f77425d9faccac8b03b363fdcc.zip
[Rework] Change time handling
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/worker.c b/src/worker.c
index 26ce63a94..544f05cbd 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -97,9 +97,8 @@ rspamd_worker_call_finish_handlers (struct rspamd_worker *worker)
if (cfg->finish_callbacks) {
ctx = worker->ctx;
/* Create a fake task object for async events */
- task = rspamd_task_new (worker, cfg, NULL, NULL);
+ task = rspamd_task_new (worker, cfg, NULL, NULL, ctx->ev_base);
task->resolver = ctx->resolver;
- task->ev_base = ctx->ev_base;
task->flags |= RSPAMD_TASK_FLAG_PROCESSING;
task->s = rspamd_session_create (task->task_pool,
rspamd_worker_finalize,
@@ -364,7 +363,7 @@ accept_socket (gint fd, short what, void *arg)
return;
}
- task = rspamd_task_new (worker, ctx->cfg, NULL, ctx->lang_det);
+ task = rspamd_task_new (worker, ctx->cfg, NULL, ctx->lang_det, ctx->ev_base);
msg_info_task ("accepted connection from %s port %d, task ptr: %p",
rspamd_inet_address_to_string (addr),
@@ -395,7 +394,6 @@ accept_socket (gint fd, short what, void *arg)
ctx->keys_cache,
NULL);
rspamd_http_connection_set_max_size (task->http_conn, task->cfg->max_message);
- task->ev_base = ctx->ev_base;
worker->nconns++;
rspamd_mempool_add_destructor (task->task_pool,
(rspamd_mempool_destruct_t)reduce_tasks_count, worker);