reset state when stop

This commit is contained in:
Tuan PM
2018-02-27 23:14:09 +07:00
parent c9e55caa5b
commit 7e3e296581

View File

@@ -734,6 +734,7 @@ esp_err_t esp_mqtt_client_stop(esp_mqtt_client_handle_t client)
{
client->run = false;
xEventGroupWaitBits(client->status_bits, STOPPED_BIT, false, true, portMAX_DELAY);
client->state = MQTT_STATE_UNKNOW;
return ESP_OK;
}