We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb70ba5 commit da92776Copy full SHA for da92776
src/ArduinoIoTCloudTCP.cpp
@@ -358,7 +358,7 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_ConnectMqttBroker()
358
}
359
360
_last_connection_attempt_cnt++;
361
- unsigned long reconnection_retry_delay = pow(2, _last_connection_attempt_cnt) * AIOT_CONFIG_RECONNECTION_RETRY_DELAY_ms;
+ unsigned long reconnection_retry_delay = (1 << _last_connection_attempt_cnt) * AIOT_CONFIG_RECONNECTION_RETRY_DELAY_ms;
362
reconnection_retry_delay = std::min(reconnection_retry_delay, static_cast<unsigned long>(AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms));
363
_next_connection_attempt_tick = millis() + reconnection_retry_delay;
364
0 commit comments