Skip to content

Commit

Permalink
Initialize ota client only if boards supports OTA
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam committed Jun 25, 2024
1 parent 323fb38 commit 6ebbf97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ArduinoIoTCloudTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ int ArduinoIoTCloudTCP::begin(ConnectionHandler & connection, bool const enable_
int ArduinoIoTCloudTCP::begin(Client * mqttClient, Client * otaClient, bool const enable_watchdog, String brokerAddress, uint16_t brokerPort)
{
_brokerTLSClient = mqttClient;
#if OTA_ENABLED
_otaTLSClient = otaClient;
#endif

/* Setup retry timers */
_connection_attempt.begin(AIOT_CONFIG_RECONNECTION_RETRY_DELAY_ms, AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms);
Expand Down

0 comments on commit 6ebbf97

Please sign in to comment.