diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-16 16:28:49 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-16 16:28:49 +0100 |
commit | 5995e6b8dba5bbe338999419fa232fe664f27ecb (patch) | |
tree | e3cbfaa82953478a4b7d0a49b974166129833424 /src | |
parent | 8b2dd63f5857056b7d3f6c67371bba906b3a2a1d (diff) | |
download | rspamd-5995e6b8dba5bbe338999419fa232fe664f27ecb.tar.gz rspamd-5995e6b8dba5bbe338999419fa232fe664f27ecb.zip |
[Minor] Another heartbeat race
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/worker_util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index f6fef8df5..58d75da5d 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -722,7 +722,8 @@ 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 && + if (wrk->hb.last_event > 0 && + time_from_last > 0 && time_from_last >= rspamd_main->cfg->heartbeat_interval * 2) { rspamd_localtime (wrk->hb.last_event, &tm); |