We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3c6faa commit f0f9a05Copy full SHA for f0f9a05
src/time/TimedAttempt.cpp
@@ -49,7 +49,8 @@ namespace arduino { namespace time {
49
unsigned long TimedAttempt::reload() {
50
unsigned long shift = _retryCount > 31 ? 31 : _retryCount;
51
unsigned long delay = (1UL << shift) * _minDelay;
52
- _retryDelay = min(delay, _maxDelay);
+ /* delay should always increase */
53
+ _retryDelay = (delay > _retryDelay) ? min(delay, _maxDelay): _maxDelay;
54
_retryTick = millis();
55
return _retryDelay;
56
}
0 commit comments