From 8daabf1f5af0d305f71880b7e16fcc5182001a82 Mon Sep 17 00:00:00 2001 From: webstreamr <210764791+webstreamr@users.noreply.github.com> Date: Tue, 20 May 2025 21:17:31 +0200 Subject: [PATCH] chore(fetcher): increase timeout to 15s (#64) --- src/utils/Fetcher.test.ts | 6 +++--- src/utils/Fetcher.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/Fetcher.test.ts b/src/utils/Fetcher.test.ts index 15ca8ba..06ad38a 100644 --- a/src/utils/Fetcher.test.ts +++ b/src/utils/Fetcher.test.ts @@ -29,7 +29,7 @@ describe('fetch', () => { 'Referer': 'https://some-url.test', }, responseType: 'text', - timeout: 10000, + timeout: 15000, }, ); }); @@ -55,7 +55,7 @@ describe('fetch', () => { 'Referer': 'https://some-url.test', }, responseType: 'text', - timeout: 10000, + timeout: 15000, }, ); @@ -70,7 +70,7 @@ describe('fetch', () => { 'Referer': 'https://some-url.test', }, responseType: 'text', - timeout: 10000, + timeout: 15000, }, ); }); diff --git a/src/utils/Fetcher.ts b/src/utils/Fetcher.ts index e00f3d8..9c2368c 100644 --- a/src/utils/Fetcher.ts +++ b/src/utils/Fetcher.ts @@ -34,7 +34,7 @@ export class Fetcher { private readonly getConfig = (ctx: Context, url: URL, config?: AxiosRequestConfig): AxiosRequestConfig => { return { responseType: 'text', - timeout: 10000, + timeout: 15000, ...config, headers: { 'User-Agent': this.createUserAgentForIp(ctx.ip),