mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-09-25 14:41:32 +02:00
reset state when stop
This commit is contained in:
@@ -734,6 +734,7 @@ esp_err_t esp_mqtt_client_stop(esp_mqtt_client_handle_t client)
|
|||||||
{
|
{
|
||||||
client->run = false;
|
client->run = false;
|
||||||
xEventGroupWaitBits(client->status_bits, STOPPED_BIT, false, true, portMAX_DELAY);
|
xEventGroupWaitBits(client->status_bits, STOPPED_BIT, false, true, portMAX_DELAY);
|
||||||
|
client->state = MQTT_STATE_UNKNOW;
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user