Skip to content

Commit 2f12cb9

Browse files
committed
TimedAttempt: add variable to store next attempt wait time
1 parent 5d9f39d commit 2f12cb9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/utility/time/TimedAttempt.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ unsigned long TimedAttempt::retry() {
5353

5454
unsigned long TimedAttempt::reload() {
5555
unsigned long retryDelay = (1 << _retryCount) * _minDelay;
56-
retryDelay = min(retryDelay, _maxDelay);
56+
_retryDelay = min(retryDelay, _maxDelay);
5757
_nextRetryTick = millis() + retryDelay;
5858
return retryDelay;
5959
}

src/utility/time/TimedAttempt.h

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class TimedAttempt {
3434
unsigned long _minDelay;
3535
unsigned long _maxDelay;
3636
unsigned long _nextRetryTick;
37+
unsigned long _retryDelay;
3738
unsigned int _retryCount;
3839
};
3940

0 commit comments

Comments
 (0)