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:
parent
67cd7bc031
commit
c1747fb8da
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ char mqtt_timer_expired(mqtt_timer_t* timer)
|
||||||
{
|
{
|
||||||
TickType_t now = xTaskGetTickCount();
|
TickType_t now = xTaskGetTickCount();
|
||||||
int32_t left = timer->end_time - now;
|
int32_t left = timer->end_time - now;
|
||||||
return (left < 0);
|
return (left <= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue