File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ unsigned long TimedAttempt::retry() {
54
54
unsigned long TimedAttempt::reload () {
55
55
unsigned long retryDelay = (1 << _retryCount) * _minDelay;
56
56
_retryDelay = min (retryDelay, _maxDelay);
57
- _nextRetryTick = millis () + _retryDelay ;
57
+ _retryTick = millis ();
58
58
return _retryDelay;
59
59
}
60
60
@@ -67,7 +67,7 @@ bool TimedAttempt::isRetry() {
67
67
}
68
68
69
69
bool TimedAttempt::isExpired () {
70
- return millis () > _nextRetryTick ;
70
+ return millis () - _retryTick > _retryDelay ;
71
71
}
72
72
73
73
unsigned int TimedAttempt::getRetryCount () {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class TimedAttempt {
34
34
private:
35
35
unsigned long _minDelay;
36
36
unsigned long _maxDelay;
37
- unsigned long _nextRetryTick ;
37
+ unsigned long _retryTick ;
38
38
unsigned long _retryDelay;
39
39
unsigned int _retryCount;
40
40
};
You can’t perform that action at this time.
0 commit comments