File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 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() {
5454unsigned long TimedAttempt::reload () {
5555 unsigned long retryDelay = (1 << _retryCount) * _minDelay;
5656 _retryDelay = min (retryDelay, _maxDelay);
57- _nextRetryTick = millis () + _retryDelay ;
57+ _retryTick = millis ();
5858 return _retryDelay;
5959}
6060
@@ -67,7 +67,7 @@ bool TimedAttempt::isRetry() {
6767}
6868
6969bool TimedAttempt::isExpired () {
70- return millis () > _nextRetryTick ;
70+ return millis () - _retryTick > _retryDelay ;
7171}
7272
7373unsigned int TimedAttempt::getRetryCount () {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class TimedAttempt {
3434private:
3535 unsigned long _minDelay;
3636 unsigned long _maxDelay;
37- unsigned long _nextRetryTick ;
37+ unsigned long _retryTick ;
3838 unsigned long _retryDelay;
3939 unsigned int _retryCount;
4040};
You can’t perform that action at this time.
0 commit comments