File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -161,11 +161,8 @@ void CloudIoTCoreMqtt::mqttConnectAsync(bool skip) {
161161}
162162
163163void CloudIoTCoreMqtt::startMQTT () {
164- if (this ->useLts ) {
165- this ->mqttClient ->begin (CLOUD_IOT_CORE_MQTT_HOST_LTS, CLOUD_IOT_CORE_MQTT_PORT, *netClient);
166- } else {
167- this ->mqttClient ->begin (CLOUD_IOT_CORE_MQTT_HOST, CLOUD_IOT_CORE_MQTT_PORT, *netClient);
168- }
164+ this ->mqttClient ->begin (useLts ? CLOUD_IOT_CORE_MQTT_HOST_LTS : CLOUD_IOT_CORE_MQTT_HOST,
165+ CLOUD_IOT_CORE_MQTT_PORT, *netClient);
169166 this ->mqttClient ->onMessage (messageReceived);
170167}
171168
@@ -251,7 +248,7 @@ void CloudIoTCoreMqtt::logError() {
251248}
252249
253250void CloudIoTCoreMqtt::logConfiguration (bool showJWT) {
254- Serial.println (" Connect with " + String (CLOUD_IOT_CORE_MQTT_HOST_LTS) +
251+ Serial.println (" Connect with " + String (useLts ? CLOUD_IOT_CORE_MQTT_HOST_LTS : CLOUD_IOT_CORE_MQTT_HOST ) +
255252 " :" + String (CLOUD_IOT_CORE_MQTT_PORT));
256253 Serial.println (" ClientId: " + device->getClientId ());
257254 if (showJWT) {
You can’t perform that action at this time.
0 commit comments