From c1747fb8dac3e1b36c7f3edf2edc925e662de73c Mon Sep 17 00:00:00 2001 From: Fernando Governatore Date: Mon, 3 Jul 2017 15:49:05 -0300 Subject: [PATCH] MQTT fix mqtt_timer_expired If the user passes 0 as a timeout, we should not sleep(the timer has already expired). --- extras/paho_mqtt_c/MQTTESP8266.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/paho_mqtt_c/MQTTESP8266.c b/extras/paho_mqtt_c/MQTTESP8266.c index cebf24a..a6f1e75 100644 --- a/extras/paho_mqtt_c/MQTTESP8266.c +++ b/extras/paho_mqtt_c/MQTTESP8266.c @@ -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); }