diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-03-02 17:04:40 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-03-02 17:04:40 +0000 |
commit | c2c75d2c816b4e96852d92085346ee2a6c5f2bab (patch) | |
tree | 8aee3255ff6505d93c17b18bb00e20b20cf06b9d /src | |
parent | 938ac78ad1099c5c216c2cec7ce6c55310744f1a (diff) | |
download | rspamd-c2c75d2c816b4e96852d92085346ee2a6c5f2bab.tar.gz rspamd-c2c75d2c816b4e96852d92085346ee2a6c5f2bab.zip |
[Minor] Use configured monitored interval
Issue: #2776
Closes: #2776
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/monitored.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libserver/monitored.c b/src/libserver/monitored.c index 9adcab943..39590bfcc 100644 --- a/src/libserver/monitored.c +++ b/src/libserver/monitored.c @@ -51,7 +51,6 @@ struct rspamd_monitored_ctx { struct rspamd_monitored { gchar *url; - gdouble monitoring_interval; gdouble monitoring_mult; gdouble offline_time; gdouble total_offline_time; @@ -173,7 +172,7 @@ rspamd_monitored_periodic (gint fd, short what, gpointer ud) gdouble jittered; gboolean ret = FALSE; - jittered = rspamd_time_jitter (m->monitoring_interval * m->monitoring_mult, + jittered = rspamd_time_jitter (m->ctx->monitoring_interval * m->monitoring_mult, 0.0); double_to_tv (jittered, &tv); @@ -480,7 +479,6 @@ rspamd_monitored_create_ (struct rspamd_monitored_ctx *ctx, m->flags = flags; m->url = g_strdup (line); m->ctx = ctx; - m->monitoring_interval = ctx->monitoring_interval; m->monitoring_mult = 1.0; m->max_errors = ctx->max_errors; m->alive = TRUE; @@ -602,7 +600,7 @@ rspamd_monitored_start (struct rspamd_monitored *m) g_assert (m != NULL); msg_debug_mon ("started monitored object %s", m->url); - jittered = rspamd_time_jitter (m->monitoring_interval * m->monitoring_mult, + jittered = rspamd_time_jitter (m->ctx->monitoring_interval * m->monitoring_mult, 0.0); double_to_tv (jittered, &tv); |