Skip to content

Commit

Permalink
remove unnecessary lines
Browse files Browse the repository at this point in the history
  • Loading branch information
ggruiz committed May 31, 2018
1 parent ee16edb commit 37931dd
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/WebClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,8 @@ export class WebClient extends EventEmitter {
const retryAfterMs = result.retryAfter !== undefined ? result.retryAfter : (60 * 1000);
this.emit('rate_limited', retryAfterMs / 1000);
this.logger.info(`API Call failed due to rate limiting. Will retry in ${retryAfterMs / 1000} seconds.`);

// wait and return the result from calling `task` again after the specified number of seconds
return delay(retryAfterMs).then(task);
// .then((result) => {
// result.wasRateLimited = true;
// return result;
// });
}
throw httpErrorWithOriginal(error);
} else {
Expand Down

0 comments on commit 37931dd

Please sign in to comment.