]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Relax heartbeat checks
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 16 Sep 2019 15:02:37 +0000 (16:02 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 16 Sep 2019 15:02:37 +0000 (16:02 +0100)
src/libserver/worker_util.c

index 19c5ac0300486866254547a2390c324de78fe8d1..f6fef8df52212017abcba4ef0730467d4006a707 100644 (file)
@@ -722,7 +722,9 @@ rspamd_main_heartbeat_cb (EV_P_ ev_timer *w, int revents)
        time_from_last -= wrk->hb.last_event;
        rspamd_main = wrk->srv;
 
-       if (time_from_last > 0 && time_from_last > rspamd_main->cfg->heartbeat_interval) {
+       if (time_from_last > 0 &&
+               time_from_last >= rspamd_main->cfg->heartbeat_interval * 2) {
+
                rspamd_localtime (wrk->hb.last_event, &tm);
                r = strftime (timebuf, sizeof (timebuf), "%F %H:%M:%S", &tm);
                rspamd_snprintf (usec_buf, sizeof (usec_buf), "%.5f",