Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
holm committed Jan 2, 2018
1 parent 45773db commit 6d399ff
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions lib/backoffs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,16 @@ module.exports = {
type: 'fixed',
delay: backoff
};
} else if (!backoff) {
return;
} else {
} else if (backoff) {
return backoff;
}
},

calculate: function (backoff, attemptsMade, customStrategies) {
if (!backoff) {
return;
}

var strategy = lookupStrategy(backoff, customStrategies);
if (backoff) {
var strategy = lookupStrategy(backoff, customStrategies);

return strategy(attemptsMade);
return strategy(attemptsMade);
}
}
};

0 comments on commit 6d399ff

Please sign in to comment.