Only make keepalive checks every 5 seconds.

This commit is contained in:
Roger A. Light
2020-11-05 21:43:23 +00:00
parent 23d3c2641e
commit 693f6ad36e
+1 -1
View File
@@ -33,7 +33,7 @@ void keepalive__check(struct mosquitto_db *db, time_t now)
{
struct mosquitto *context, *ctxt_tmp;
if(last_keepalive_check != now){
if(last_keepalive_check + 5 < now){
last_keepalive_check = now;
/* FIXME - this needs replacing with something more efficient */