diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-18 12:21:49 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-18 12:21:49 +0100 |
commit | c08441485a5564ade36ffa8983324919535ba13b (patch) | |
tree | f5870c6170fa7d9ef468e4042d3301d7ea7cbb94 | |
parent | 9cfe6f018bb6a5467bd030171d40684603fabb8b (diff) | |
download | rspamd-c08441485a5564ade36ffa8983324919535ba13b.tar.gz rspamd-c08441485a5564ade36ffa8983324919535ba13b.zip |
[Fix] Fix timeout setup on learning
-rw-r--r-- | src/libstat/backends/redis_backend.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index 0b26f39c7..2d2806425 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -1248,12 +1248,6 @@ rspamd_redis_learn_tokens (struct rspamd_task *task, GPtrArray *tokens, g_assert (rt->redis != NULL); redisLibeventAttach (rt->redis, task->ev_base); - - event_set (&rt->timeout_event, -1, EV_TIMEOUT, rspamd_redis_timeout, rt); - event_base_set (task->ev_base, &rt->timeout_event); - double_to_tv (rt->ctx->timeout, &tv); - event_add (&rt->timeout_event, &tv); - rspamd_redis_maybe_auth (rt->ctx, rt->redis); if (rt->stcf->clcf->flags & RSPAMD_FLAG_CLASSIFIER_INTEGER) { @@ -1316,6 +1310,7 @@ rspamd_redis_learn_tokens (struct rspamd_task *task, GPtrArray *tokens, rspamd_session_add_event (task->s, rspamd_redis_fin_learn, rt, rspamd_redis_stat_quark ()); rt->has_event = TRUE; + /* Set timeout */ if (event_get_base (&rt->timeout_event)) { event_del (&rt->timeout_event); |