diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-01 12:34:06 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-01 12:34:06 +0000 |
commit | 5b6d0857950eec979662af72e72ce4101ac2671d (patch) | |
tree | 200c6cb7a6011058f4c56fe7271e4b8c2fcc3d24 /contrib | |
parent | 0194245dcdbecfb34088339689668fd6c1111cb8 (diff) | |
download | rspamd-5b6d0857950eec979662af72e72ce4101ac2671d.tar.gz rspamd-5b6d0857950eec979662af72e72ce4101ac2671d.zip |
[Minor] Rdns: Update loop timestamp if it is cheap
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/librdns/rdns_ev.h | 3 |
1 files changed, 3 insertions, 0 deletions
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); } } |