@naturalcycles/js-lib 15.73.0 → 15.73.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http/fetcher.js +3 -0
- package/package.json +1 -1
- package/src/http/fetcher.ts +3 -0
package/dist/http/fetcher.js
CHANGED
|
@@ -517,6 +517,9 @@ export class Fetcher {
|
|
|
517
517
|
* statusCode of 0 (or absense of it) will BE retried.
|
|
518
518
|
*/
|
|
519
519
|
shouldRetry(res) {
|
|
520
|
+
// Don't retry if the input AbortSignal was aborted
|
|
521
|
+
if (res.req.signal?.aborted)
|
|
522
|
+
return false;
|
|
520
523
|
const { retryPost, retry3xx, retry4xx, retry5xx } = res.req;
|
|
521
524
|
const { method } = res.req.init;
|
|
522
525
|
if (method === 'POST' && !retryPost)
|
package/package.json
CHANGED
package/src/http/fetcher.ts
CHANGED
|
@@ -646,6 +646,9 @@ export class Fetcher {
|
|
|
646
646
|
* statusCode of 0 (or absense of it) will BE retried.
|
|
647
647
|
*/
|
|
648
648
|
private shouldRetry(res: FetcherResponse): boolean {
|
|
649
|
+
// Don't retry if the input AbortSignal was aborted
|
|
650
|
+
if (res.req.signal?.aborted) return false
|
|
651
|
+
|
|
649
652
|
const { retryPost, retry3xx, retry4xx, retry5xx } = res.req
|
|
650
653
|
const { method } = res.req.init
|
|
651
654
|
if (method === 'POST' && !retryPost) return false
|