mirror of
https://github.com/sct/overseerr.git
synced 2025-12-27 00:34:56 +01:00
fix: assign the keep-alive value explicitly (#1368)
* fix: assign the keep-alive value explicitly The Node.js documentation mentions that the default keep-alive value is not used when creating a global agent manually, which is done in customProxyAgent.ts. re #1365 * fix: typo
This commit is contained in:
@@ -6,7 +6,7 @@ import { Agent, ProxyAgent, setGlobalDispatcher } from 'undici';
|
||||
export default async function createCustomProxyAgent(
|
||||
proxySettings: ProxySettings
|
||||
) {
|
||||
const defaultAgent = new Agent();
|
||||
const defaultAgent = new Agent({ keepAliveTimeout: 5000 });
|
||||
|
||||
const skipUrl = (url: string) => {
|
||||
const hostname = new URL(url).hostname;
|
||||
@@ -63,6 +63,7 @@ export default async function createCustomProxyAgent(
|
||||
interceptors: {
|
||||
Client: [noProxyInterceptor],
|
||||
},
|
||||
keepAliveTimeout: 5000,
|
||||
});
|
||||
|
||||
setGlobalDispatcher(proxyAgent);
|
||||
|
||||
Reference in New Issue
Block a user