mirror of
https://github.com/espressif/esp-mqtt.git
synced 2026-08-03 20:14:15 +02:00
feat: Provide reason code in MQTT event
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user