@@ -71,7 +71,6 @@ ArduinoIoTCloudTCP::ArduinoIoTCloudTCP()
7171, _shadowTopicIn(" " )
7272, _dataTopicOut(" " )
7373, _dataTopicIn(" " )
74- , _ota_topic_in{" " }
7574#if OTA_ENABLED
7675, _ota_error{static_cast <int >(OTAError::None)}
7776, _ota_img_sha256{" Inv." }
@@ -139,7 +138,6 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
139138 _shadowTopicIn = getTopic_shadowin ();
140139 _dataTopicOut = getTopic_dataout ();
141140 _dataTopicIn = getTopic_datain ();
142- _ota_topic_in = getTopic_ota_in ();
143141
144142#if OTA_ENABLED
145143 addPropertyReal (_ota_error, " OTA_ERROR" , Permission::Read);
@@ -226,17 +224,11 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeMqttTopics()
226224 return State::SubscribeMqttTopics;
227225 }
228226
229- if (!_mqttClient.subscribe (_ota_topic_in))
230- {
231- DBG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _ota_topic_in.c_str ());
232- return State::SubscribeMqttTopics;
233- }
234-
235227 if (_shadowTopicIn != " " )
236228 {
237229 if (!_mqttClient.subscribe (_shadowTopicIn))
238230 {
239- DBG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _ota_topic_in .c_str ());
231+ DBG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _shadowTopicIn .c_str ());
240232 return State::SubscribeMqttTopics;
241233 }
242234 }
0 commit comments