feat: Provide reason code in MQTT event

This commit is contained in:
Bogdan Kolendovskyy
2026-04-24 14:15:29 +02:00
parent 996177a46d
commit f1fc00ca44
6 changed files with 35 additions and 7 deletions
@@ -33,7 +33,7 @@ static void mqtt_event_handler(void *handler_args, esp_event_base_t base, int32_
case MQTT_EVENT_DISCONNECTED:
#if CONFIG_MQTT_PROTOCOL_5
if (event->error_handle) {
ESP_LOGW(TAG, "DISCONNECT_REASON=%d", event->error_handle->disconnect_return_code);
ESP_LOGW(TAG, "DISCONNECT_REASON=%d", event->reason_code);
}
#endif