Skip to content

Commit e7bf7c8

Browse files
authored
BUGFIX-RELEASE: Updated retry logic
Retry logic was refactored into an iterative rather than recursive loop. Additional clarification on retryMaxDuration added as well.
1 parent dd0fd50 commit e7bf7c8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This library works the same as the normal [`fetch api`](https://developer.mozill
2222

2323
Without configuring any parameters, the retry behavior will be as follows:
2424
- retry for 60s
25-
- retry inital delay of 100ms with exponential backoff
25+
- retry inital delay of 100ms with exponential backoff, configurable as a multiplier defaulting to 2
2626
- retry only on 5xx response
2727
- socket timeout of 30s
2828
```js
@@ -147,6 +147,9 @@ async main() {
147147

148148
Disabling retry behavior will not prevent the usage of other options set on the `options` object.
149149

150+
### Additional notes on retry duration
151+
152+
If the fetch is unsucessful, the retry logic determines how long it will wait before the next attempt. If the time remaining will exceed the total time allowed by retryMaxDuration then another attempt will not be made. There are examples of how this works in the testing code.
150153

151154
### Apache OpenWhisk Action Support
152155

0 commit comments

Comments
 (0)