Skip to content

Commit 395aa14

Browse files
Merge branch 'fix/stop_only_if_started' into 'master'
Fix: Stop client only if it's running. See merge request espressif/esp-mqtt!183
2 parents 8d98103 + 36eec6f commit 395aa14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mqtt_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ esp_err_t esp_mqtt_client_destroy(esp_mqtt_client_handle_t client)
877877
if (client == NULL) {
878878
return ESP_ERR_INVALID_ARG;
879879
}
880-
if (client->api_lock) {
880+
if (client->run) {
881881
esp_mqtt_client_stop(client);
882882
}
883883
esp_mqtt_destroy_config(client);

0 commit comments

Comments
 (0)