Skip to content

Commit

Permalink
Merge pull request #161 from ziron4/master
Browse files Browse the repository at this point in the history
Removed * 0.75 to be compliant with documentation
  • Loading branch information
LiamBindle authored Apr 26, 2022
2 parents 3416ef3 + 9659bfc commit 6e0ccda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6e0ccda

Please sign in to comment.