diff --git a/include/mqtt_config.h b/include/mqtt_config.h index e259a2a..d9b64c7 100644 --- a/include/mqtt_config.h +++ b/include/mqtt_config.h @@ -84,8 +84,8 @@ #endif #endif -#ifdef CONFIG_OUTBOX_EXPIRED_TIMEOUT_MS -#define OUTBOX_EXPIRED_TIMEOUT_MS CONFIG_OUTBOX_EXPIRED_TIMEOUT_MS +#ifdef CONFIG_MQTT_OUTBOX_EXPIRED_TIMEOUT_MS +#define OUTBOX_EXPIRED_TIMEOUT_MS CONFIG_MQTT_OUTBOX_EXPIRED_TIMEOUT_MS #else #define OUTBOX_EXPIRED_TIMEOUT_MS (30*1000) #endif diff --git a/lib/mqtt_outbox.c b/lib/mqtt_outbox.c index 4ba4b76..7409965 100644 --- a/lib/mqtt_outbox.c +++ b/lib/mqtt_outbox.c @@ -16,7 +16,6 @@ typedef struct outbox_item { int msg_type; int msg_qos; outbox_tick_t tick; - int retry_count; pending_state_t pending; STAILQ_ENTRY(outbox_item) next; } outbox_item_t; diff --git a/mqtt_client.c b/mqtt_client.c index 19eadf1..46fdebc 100644 --- a/mqtt_client.c +++ b/mqtt_client.c @@ -1494,6 +1494,7 @@ esp_err_t esp_mqtt_client_stop(esp_mqtt_client_handle_t client) /* A running client cannot be stopped from the MQTT task/event handler */ TaskHandle_t running_task = xTaskGetCurrentTaskHandle(); if (running_task == client->task_handle) { + MQTT_API_UNLOCK(client); ESP_LOGE(TAG, "Client cannot be stopped from MQTT task"); return ESP_FAIL; }