From 9659bfcb2162ce890a950926090c1dc9fefa97e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=B8rgaard=20Larsen?= Date: Wed, 23 Mar 2022 15:24:10 +0100 Subject: [PATCH] Removed * 0.75 to be compliant with documentation --- src/mqtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt.c b/src/mqtt.c index 97ebc66..14cbbac 100644 --- a/src/mqtt.c +++ b/src/mqtt.c @@ -622,7 +622,7 @@ ssize_t __mqtt_send(struct mqtt_client *client) /* check for keep-alive */ { - mqtt_pal_time_t keep_alive_timeout = client->time_of_last_send + (mqtt_pal_time_t)((float)(client->keep_alive) * 0.75); + mqtt_pal_time_t keep_alive_timeout = client->time_of_last_send + (mqtt_pal_time_t)((float)(client->keep_alive)); if (MQTT_PAL_TIME() > keep_alive_timeout) { ssize_t rv = __mqtt_ping(client); if (rv != MQTT_OK) {