From 3081b98a6a6427fd67b0200e5936832e3606244e Mon Sep 17 00:00:00 2001 From: strawmanbobi Date: Tue, 18 Feb 2025 12:38:51 +0800 Subject: [PATCH] typo fix --- esp8285/src/emq_client.cpp | 6 ++++-- esp8285/src/iot_hub.cpp | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/esp8285/src/emq_client.cpp b/esp8285/src/emq_client.cpp index e6e1b12..69a77fe 100644 --- a/esp8285/src/emq_client.cpp +++ b/esp8285/src/emq_client.cpp @@ -63,7 +63,9 @@ int connectToEMQXBroker(PubSubClient &mqtt_client) { force_disconnected = false; while (!force_disconnected && !emqx_client->connected() && retry_times < MQTT_RETRY_MAX) { - INFOF("Connecting to MQTT Broker as %s.....\n", g_mqtt_client_id.c_str()); + INFOF("Connecting to MQTT Broker, client_id = %s, user_name = %s\n", + g_mqtt_client_id.c_str(), + g_mqtt_user_name.c_str()); if (emqx_client->connect(g_mqtt_client_id.c_str(), g_mqtt_user_name.c_str(), g_mqtt_password.c_str())) { INFOF("Connected to MQTT broker\n"); } else { @@ -79,7 +81,7 @@ int connectToEMQXBroker(PubSubClient &mqtt_client) { ERRORF("IoT failed to connect\n"); ESP.restart(); } - return 0; + return 0; } void emqxClientKeepAlive(PubSubClient& mqtt_client) { diff --git a/esp8285/src/iot_hub.cpp b/esp8285/src/iot_hub.cpp index a80bd62..e406e56 100644 --- a/esp8285/src/iot_hub.cpp +++ b/esp8285/src/iot_hub.cpp @@ -107,7 +107,6 @@ int connectIot() { } } else { g_mqtt_type = MQTT_TYPE_ALIOT; - } if (0 != conn_ret) {