diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-16 11:32:49 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-16 11:32:49 +0000 |
commit | a14f2804072416d77a8e2ad44292ceb41b81966a (patch) | |
tree | fe90eb17ca95d0dcc97a4b9b67303be81f2c481f /src/libserver | |
parent | db3a82420612a7173ca173aaad764d01a96da471 (diff) | |
download | rspamd-a14f2804072416d77a8e2ad44292ceb41b81966a.tar.gz rspamd-a14f2804072416d77a8e2ad44292ceb41b81966a.zip |
[Minor] Try to fix brain damaged libev timers
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/fuzzy_backend/fuzzy_backend_redis.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c index 32f03cfe2..3574a63bf 100644 --- a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c +++ b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c @@ -420,6 +420,7 @@ rspamd_fuzzy_redis_shingles_callback (redisAsyncContext *c, gpointer r, else { /* Add timeout */ session->timeout.data = session; + ev_now_update_if_cheap ((struct ev_loop *)session->event_loop); ev_timer_init (&session->timeout, rspamd_fuzzy_redis_timeout, session->backend->timeout, 0.0); @@ -500,6 +501,7 @@ rspamd_fuzzy_backend_check_shingles (struct rspamd_fuzzy_redis_session *session) else { /* Add timeout */ session->timeout.data = session; + ev_now_update_if_cheap ((struct ev_loop *)session->event_loop); ev_timer_init (&session->timeout, rspamd_fuzzy_redis_timeout, session->backend->timeout, 0.0); @@ -677,6 +679,7 @@ rspamd_fuzzy_backend_check_redis (struct rspamd_fuzzy_backend *bk, else { /* Add timeout */ session->timeout.data = session; + ev_now_update_if_cheap ((struct ev_loop *)session->event_loop); ev_timer_init (&session->timeout, rspamd_fuzzy_redis_timeout, session->backend->timeout, 0.0); @@ -802,6 +805,7 @@ rspamd_fuzzy_backend_count_redis (struct rspamd_fuzzy_backend *bk, else { /* Add timeout */ session->timeout.data = session; + ev_now_update_if_cheap ((struct ev_loop *)session->event_loop); ev_timer_init (&session->timeout, rspamd_fuzzy_redis_timeout, session->backend->timeout, 0.0); @@ -928,6 +932,7 @@ rspamd_fuzzy_backend_version_redis (struct rspamd_fuzzy_backend *bk, else { /* Add timeout */ session->timeout.data = session; + ev_now_update_if_cheap ((struct ev_loop *)session->event_loop); ev_timer_init (&session->timeout, rspamd_fuzzy_redis_timeout, session->backend->timeout, 0.0); @@ -1554,6 +1559,7 @@ rspamd_fuzzy_backend_update_redis (struct rspamd_fuzzy_backend *bk, else { /* Add timeout */ session->timeout.data = session; + ev_now_update_if_cheap ((struct ev_loop *)session->event_loop); ev_timer_init (&session->timeout, rspamd_fuzzy_redis_timeout, session->backend->timeout, 0.0); |