Merge branch 'bugfix/stop_in_wait_reconnection' into 'master'

Moves state change when stopping the client

See merge request espressif/esp-mqtt!150
This commit is contained in:
David Čermák
2022-10-26 21:19:00 +08:00

View File

@@ -1653,6 +1653,7 @@ static void esp_mqtt_task(void *pv)
esp_transport_close(client->transport);
outbox_delete_all_items(client->outbox);
xEventGroupSetBits(client->status_bits, STOPPED_BIT);
client->state = MQTT_STATE_DISCONNECTED;
vTaskDelete(NULL);
}