From 01057f6dfaa2a0826e6b1bbca7fd90af5699e9c0 Mon Sep 17 00:00:00 2001 From: Luan Date: Sun, 27 Oct 2024 10:27:38 -0300 Subject: [PATCH] refactor: Remove global dispatcher config --- src/platform/node.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/platform/node.ts b/src/platform/node.ts index 5c5a5b4c..3758aabf 100644 --- a/src/platform/node.ts +++ b/src/platform/node.ts @@ -6,9 +6,7 @@ import { Response, Headers, FormData, - File, - setGlobalDispatcher, - Agent + File } from 'undici'; import type { ICache } from '../types/Cache.js'; import { Platform } from '../utils/Utils.js'; @@ -29,12 +27,6 @@ const __dirname__ = is_cjs ? __dirname : path.dirname(fileURLToPath(meta_url)); const { homepage, version, bugs } = $INLINE_JSON('../../package.json'); const repo_url = homepage?.split('#')[0]; -setGlobalDispatcher(new Agent({ - connect: { - timeout: 60_000 - } -})); - class Cache implements ICache { #persistent_directory: string; #persistent: boolean;