commit ff7352b: [Minor] Fix repeat when restarting timer

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Jun 24 11:49:04 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-06-24 12:42:03 +0100
URL: https://github.com/rspamd/rspamd/commit/ff7352bec19a5044b577d5b315209ad101ea0bcb (HEAD -> master)

[Minor] Fix repeat when restarting timer

---
 src/libstat/backends/redis_backend.c | 2 ++
 1 file changed, 2 insertions(+)

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 {


More information about the Commits mailing list