mirror of
https://github.com/espressif/esp-mqtt.git
synced 2026-10-13 11:17:36 +00:00
Keppalive issue
There is no keepalive packget if current time is very large. Caused by integer overflow.
This commit is contained in:
@@ -27,5 +27,5 @@
|
||||
|
||||
char *platform_create_id_string();
|
||||
int platform_random(int max);
|
||||
int platform_tick_get_ms();
|
||||
long long platform_tick_get_ms();
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,7 @@ int platform_random(int max)
|
||||
return esp_random()%max;
|
||||
}
|
||||
|
||||
int platform_tick_get_ms()
|
||||
long long platform_tick_get_ms()
|
||||
{
|
||||
struct timeval te;
|
||||
gettimeofday(&te, NULL); // get current time
|
||||
|
||||
Reference in New Issue
Block a user