commit 5b6d085: [Minor] Rdns: Update loop timestamp if it is cheap
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Nov 1 12:35:17 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-11-01 12:34:06 +0000
URL: https://github.com/rspamd/rspamd/commit/5b6d0857950eec979662af72e72ce4101ac2671d (HEAD -> master)
[Minor] Rdns: Update loop timestamp if it is cheap
---
contrib/librdns/rdns_ev.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/contrib/librdns/rdns_ev.h b/contrib/librdns/rdns_ev.h
index aad34abda..3827bcde2 100644
--- a/contrib/librdns/rdns_ev.h
+++ b/contrib/librdns/rdns_ev.h
@@ -162,6 +162,7 @@ rdns_libev_add_timer (void *priv_data, double after, void *user_data)
if (ev != NULL) {
ev_timer_init (ev, rdns_libev_timer_event, after, after);
ev->data = user_data;
+ ev_now_update_if_cheap ((struct ev_loop *)priv_data);
ev_timer_start ((struct ev_loop *)priv_data, ev);
}
return (void *)ev;
@@ -184,6 +185,7 @@ rdns_libev_add_periodic (void *priv_data, double after,
cbdata->ev = ev;
ev_timer_init (ev, rdns_libev_periodic_event, after, after);
ev->data = cbdata;
+ ev_now_update_if_cheap ((struct ev_loop *)priv_data);
ev_timer_start ((struct ev_loop *)priv_data, ev);
}
else {
@@ -211,6 +213,7 @@ rdns_libev_repeat_timer (void *priv_data, void *ev_data)
{
ev_timer *ev = (ev_timer *)ev_data;
if (ev != NULL) {
+ ev_now_update_if_cheap ((struct ev_loop *)priv_data);
ev_timer_again ((struct ev_loop *)priv_data, ev);
}
}
More information about the Commits
mailing list