MQTT fix mqtt_timer_expired

If the user passes 0 as a timeout, we should not sleep(the timer has
already expired).
This commit is contained in:
Fernando Governatore 2017-07-03 15:49:05 -03:00
parent 67cd7bc031
commit c1747fb8da

View file

@ -32,7 +32,7 @@ char mqtt_timer_expired(mqtt_timer_t* timer)
{
TickType_t now = xTaskGetTickCount();
int32_t left = timer->end_time - now;
return (left < 0);
return (left <= 0);
}