Changes the moment we update keepalive_tick.

In order to keep sending keep alive messages in the scenario were client
publish too often with QoS0 the keepalive is updated when the response
is received.
This commit is contained in:
Euripedes Rocha
2022-03-22 14:26:49 -03:00
parent 5878e2e8a6
commit 2c2e6f38b5
4 changed files with 43 additions and 25 deletions

View File

@@ -84,7 +84,7 @@ typedef struct mqtt_connect_info {
char *password;
char *will_topic;
char *will_message;
int keepalive; /*!< keepalive=0 -> keepalive is disabled */
int64_t keepalive; /*!< keepalive=0 -> keepalive is disabled */
int will_length;
int will_qos;
int will_retain;

View File

@@ -9,11 +9,12 @@
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include <stdint.h>
#include <sys/time.h>
char *platform_create_id_string(void);
int platform_random(int max);
long long platform_tick_get_ms(void);
int64_t platform_tick_get_ms(void);
void ms_to_timeval(int timeout_ms, struct timeval *tv);
#define ESP_MEM_CHECK(TAG, a, action) if (!(a)) { \