Skip to content

Commit 2964bc4

Browse files
committed
Allow low values in setMaxNumRetry
1 parent c268df6 commit 2964bc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ESPNtpClient.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ constexpr auto DEFAULT_NTP_TIMEOUT = 1500; ///< @brief Default NTP timeout ms
4949
constexpr auto MIN_NTP_TIMEOUT = 100; ///< @brief Minumum admisible ntp timeout in ms
5050
constexpr auto MIN_NTP_INTERVAL = 5; ///< @brief Minumum NTP request interval in seconds
5151
constexpr auto DEFAULT_MIN_SYNC_ACCURACY_US = 5000; ///< @brief Minimum sync accuracy in us
52-
constexpr auto DEFAULT_MAX_RESYNC_RETRY = 4; ///< @brief Maximum number of sync retrials if offset is above accuravy
52+
constexpr auto DEFAULT_MAX_RESYNC_RETRY = 3; ///< @brief Maximum number of sync retrials if offset is above accuravy
5353
#ifdef ESP8266
5454
constexpr auto ESP8266_LOOP_TASK_INTERVAL = 500; ///< @brief Loop task period on ESP8266
5555
constexpr auto ESP8266_RECEIVER_TASK_INTERVAL = 100; ///< @brief Receiver task period on ESP8266
@@ -476,9 +476,9 @@ class NTPClient {
476476
* @param maxRetry Max sync retrials number
477477
*/
478478
void setMaxNumSyncRetry (unsigned long maxRetry) {
479-
if (maxRetry > DEFAULT_MAX_RESYNC_RETRY) {
479+
//if (maxRetry > DEFAULT_MAX_RESYNC_RETRY) {
480480
maxNumSyncRetry = maxRetry;
481-
}
481+
//}
482482
}
483483

484484
/**

0 commit comments

Comments
 (0)