Skip to content

Commit de1a41e

Browse files
committed
Add specific define for max number of retry connecting to device topic
1 parent 21d586e commit de1a41e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/AIoTC_Config.h

+1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
#define AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms (32000UL)
142142
#define AIOT_CONFIG_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms (2000UL)
143143
#define AIOT_CONFIG_MAX_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms (32000UL)
144+
#define AIOT_CONFIG_DEVICE_TOPIC_MAX_RETRY_CNT (10UL)
144145
#define AIOT_CONFIG_DEVICE_TOPIC_ATTACH_RETRY_DELAY_ms (20000UL)
145146
#define AIOT_CONFIG_MAX_DEVICE_TOPIC_ATTACH_RETRY_DELAY_ms (1280000UL)
146147
#define AIOT_CONFIG_THING_TOPICS_SUBSCRIBE_RETRY_DELAY_ms (1000UL)

src/ArduinoIoTCloudTCP.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeDeviceTopic()
396396
}
397397

398398
/* Max retry than disconnect */
399-
if (_last_device_subscribe_cnt > AIOT_CONFIG_LASTVALUES_SYNC_MAX_RETRY_CNT)
399+
if (_last_device_subscribe_cnt > AIOT_CONFIG_DEVICE_TOPIC_MAX_RETRY_CNT)
400400
{
401401
_last_device_subscribe_cnt = 0;
402402
return State::Disconnect;

0 commit comments

Comments
 (0)