mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-24 17:44:08 +08:00
Only make keepalive checks every 5 seconds.
This commit is contained in:
+1
-1
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user