From: Vsevolod Stakhov Date: Mon, 24 Jun 2019 11:42:03 +0000 (+0100) Subject: [Minor] Fix repeat when restarting timer X-Git-Tag: 2.0~747 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ff7352bec19a5044b577d5b315209ad101ea0bcb;p=rspamd.git [Minor] Fix repeat when restarting timer --- diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index e430e491e..57a2c1343 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -1590,6 +1590,7 @@ rspamd_redis_process_tokens (struct rspamd_task *task, if (ev_is_active (&rt->timeout_event)) { + rt->timeout_event.repeat = rt->ctx->timeout; ev_timer_again (task->event_loop, &rt->timeout_event); } else { @@ -1802,6 +1803,7 @@ rspamd_redis_learn_tokens (struct rspamd_task *task, GPtrArray *tokens, /* Set timeout */ if (ev_is_active (&rt->timeout_event)) { + rt->timeout_event.repeat = rt->ctx->timeout; ev_timer_again (task->event_loop, &rt->timeout_event); } else {