mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-07-30 18:58:07 +02:00
Add vTaskDelay in STATE_WAIT_TIMEOUT, resolve #27
This commit is contained in:
@ -48,10 +48,6 @@ typedef struct {
|
||||
|
||||
typedef esp_mqtt_event_t* esp_mqtt_event_handle_t;
|
||||
|
||||
|
||||
/**
|
||||
* \return True on connect success, false on error
|
||||
*/
|
||||
typedef esp_err_t (* mqtt_event_callback_t)(esp_mqtt_event_handle_t event);
|
||||
|
||||
|
||||
|
@ -708,7 +708,7 @@ static void esp_mqtt_task(void *pv)
|
||||
client->reconnect_tick = platform_tick_get_ms();
|
||||
ESP_LOGD(TAG, "Reconnecting...");
|
||||
}
|
||||
// wait for timeout then change state to INIT
|
||||
vTaskDelay(client->wait_timeout_ms/2/portTICK_RATE_MS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user