diff --git a/src/client.c b/src/client.c index b1772b9..b02c31f 100644 --- a/src/client.c +++ b/src/client.c @@ -358,7 +358,7 @@ lwmqtt_err_t lwmqtt_connect(lwmqtt_client_t *client, lwmqtt_options_t options, l client->timer_set(client->command_timer, timeout); // save keep alive interval (take 75% to be a little earlier than actually needed) - client->keep_alive_interval = (uint32_t)(options.keep_alive * 750); + client->keep_alive_interval = (uint32_t)(options.keep_alive) * 750; // set keep alive timer client->timer_set(client->keep_alive_timer, client->keep_alive_interval);