summaryrefslogtreecommitdiffstats
path: root/src/fuzzy_storage.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-14 14:17:29 -0400
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-14 14:17:29 -0400
commit04f6dc10a4f6b6b39520fd3287401e5dbfa81b4c (patch)
tree73cef06ed1365e4f3ab212cfd4a36724a398afe3 /src/fuzzy_storage.c
parent1d5a96e14673835b76f339ce39e3728f8c9d6867 (diff)
downloadrspamd-04f6dc10a4f6b6b39520fd3287401e5dbfa81b4c.tar.gz
rspamd-04f6dc10a4f6b6b39520fd3287401e5dbfa81b4c.zip
Use common routine for jittering time values.
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r--src/fuzzy_storage.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index 052cf64c9..f544c4090 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -311,8 +311,7 @@ sync_callback (gint fd, short what, void *arg)
evtimer_set (&tev, sync_callback, worker);
event_base_set (ctx->ev_base, &tev);
/* Plan event with jitter */
- next_check = ctx->sync_timeout * (1. + ((gdouble)ottery_rand_uint32 ()) /
- G_MAXUINT32);
+ next_check = rspamd_time_jitter (ctx->sync_timeout, 0);
double_to_tv (next_check, &tmv);
evtimer_add (&tev, &tmv);