]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix repeat when restarting timer
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 24 Jun 2019 11:42:03 +0000 (12:42 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 24 Jun 2019 11:42:03 +0000 (12:42 +0100)
src/libstat/backends/redis_backend.c

index e430e491e0026cde5ca9e336801d4914340c8b99..57a2c134366aacb87077e4371d7ede94c1208f3c 100644 (file)
@@ -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 {