espressif / esp-mqtt

ESP32 mqtt component
Apache License 2.0
603 stars 255 forks source link

tick variable used in outbox_item_t is 4 byte instead of 8 byte this is problem since platform_tick_get_ms() is 8 byte (IDFGH-2491) #144

Closed umer-ilyas closed 4 years ago

umer-ilyas commented 4 years ago

return type of function platform_tick_get_ms is 8 byte and it value is being used as 4 byte is some place where its value is stored as 4 byte (int). e.g. last_retransmit msg_tick and tick in outbox_item_t

problem occurs especially here line 1149 in mqtt_client.c } else if (platform_tick_get_ms() - last_retransmit > 1000) {

Commit 057f140 using with esp-idf tag v3.3.1

david-cermak commented 4 years ago

@umer-ilyas Thanks for reporting this problem! will fix

e4tech commented 4 years ago

@umer-ilyas very good catch !