feat: add ClientOptions#retryLimit (#2805)

* feat: add ClientOptions#retryLimit

* hydra needs to learn how to code right

* a default would probably help

* move incrementor & update comment

* clarify docs on Infinity
This commit is contained in:
Isabella
2018-08-31 21:51:35 -05:00
committed by Crawl
parent 3970c5005b
commit be4d6f9dc3
5 changed files with 10 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ const browser = exports.browser = typeof window !== 'undefined';
* requests (higher values will reduce rate-limiting errors on bad connections)
* @property {number} [restSweepInterval=60] How frequently to delete inactive request buckets, in seconds
* (or 0 for never)
* @property {number} [retryLimit=1] How many times to retry on 5XX errors (Infinity for indefinite amount of retries)
* @property {PresenceData} [presence] Presence data to use upon login
* @property {WSEventType[]} [disabledEvents] An array of disabled websocket events. Events in this array will not be
* processed, potentially resulting in performance improvements for larger bots. Only disable events you are
@@ -42,6 +43,7 @@ exports.DefaultOptions = {
disableEveryone: false,
restWsBridgeTimeout: 5000,
disabledEvents: [],
retryLimit: 1,
restTimeOffset: 500,
restSweepInterval: 60,
presence: {},