mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-06-25 09:21:40 +02:00
Moves state change when stopping the client
- In some situations client could be left in a state where it's impossible to restart due to a state change while waiting for the stop. This guarantee that it's possible to start after calling stop. Closes https://github.com/espressif/esp-mqtt/issues/239
This commit is contained in:
@ -1546,6 +1546,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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user