From e2e7d04401ff49a296651c2058dd724955293805 Mon Sep 17 00:00:00 2001 From: Daniel Ricaud Date: Fri, 7 Apr 2023 10:27:48 -0500 Subject: [PATCH] Added axios retry logic when fetching remote chunk from url (#174) --- lib/tdf3/src/utils/chunkers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tdf3/src/utils/chunkers.ts b/lib/tdf3/src/utils/chunkers.ts index 11d40bff..66edccd4 100644 --- a/lib/tdf3/src/utils/chunkers.ts +++ b/lib/tdf3/src/utils/chunkers.ts @@ -5,7 +5,7 @@ import { type AnyTdfStream, isAnyTdfStream } from '../client/tdf-stream.js'; import axiosRetry from 'axios-retry'; // @ts-ignore -axiosRetry(axios, { retries: 3 }); // Retries all idempotent requests (GET, HEAD, OPTIONS, PUT, DELETE) +axiosRetry(axios, { retries: 3, retryDelay: axiosRetry.exponentialDelay }); // Retries all idempotent requests (GET, HEAD, OPTIONS, PUT, DELETE) /** * Read data from a seekable stream.