You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,11 +118,12 @@ Milliseconds after which the request will be aborted and an error event with `ET
118
118
119
119
###### retries
120
120
121
-
Type: `number`
121
+
Type: `number`, `function`
122
122
Default: `5`
123
123
124
-
Number of request retries when network errors happens.
124
+
Number of request retries when network errors happens. Delays between retries counts with function `Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 0).
125
125
126
+
Option accepts `function` with `retry` argument that must return delay in milliseconds (`0` return value cancels retry).
0 commit comments