Skip to content

Commit

Permalink
Simplify setTimeout using bind() in a useful way
Browse files Browse the repository at this point in the history
  • Loading branch information
felixge committed May 15, 2011
1 parent 332c633 commit f87e33e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/retry_operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ RetryOperation.prototype.retry = function(err) {
return false;
}

setTimeout(function() {
this._fn();
}.bind(this), timeout);
setTimeout(this._fn.bind(this), timeout);

return true;
};
Expand Down

0 comments on commit f87e33e

Please sign in to comment.