Skip to content

Commit 6ebbf97

Browse files
committed
Initialize ota client only if boards supports OTA
1 parent 323fb38 commit 6ebbf97

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/ArduinoIoTCloudTCP.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ int ArduinoIoTCloudTCP::begin(ConnectionHandler & connection, bool const enable_
140140
int ArduinoIoTCloudTCP::begin(Client * mqttClient, Client * otaClient, bool const enable_watchdog, String brokerAddress, uint16_t brokerPort)
141141
{
142142
_brokerTLSClient = mqttClient;
143+
#if OTA_ENABLED
143144
_otaTLSClient = otaClient;
145+
#endif
144146

145147
/* Setup retry timers */
146148
_connection_attempt.begin(AIOT_CONFIG_RECONNECTION_RETRY_DELAY_ms, AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms);

0 commit comments

Comments
 (0)