reset state when stop
This commit is contained in:
1 parent
c9e55caa5b
commit
7e3e296581
1 file changed
+1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user