From c45bd487fd1966ce6ba5760e7f81fac0a5dbe066 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Mon, 30 Sep 2024 15:56:53 +0200 Subject: [PATCH] Skip keepAlive flag (microsoft/vscode#228872) --- CHANGELOG.md | 3 +++ src/index.ts | 2 +- tests/test-client/src/direct.test.ts | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08a854a..7396360 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log Notable changes will be documented here. +## [TBD] +- Skip keepAlive flag ([microsoft/vscode#228872](https://github.com/microsoft/vscode/issues/228872)) + ## [0.23.0] - Pass on keepAlive flag ([microsoft/vscode#173861](https://github.com/microsoft/vscode/issues/173861)) diff --git a/src/index.ts b/src/index.ts index 16c5952..2818395 100644 --- a/src/index.ts +++ b/src/index.ts @@ -372,7 +372,7 @@ export function createHttpPatch(params: ProxyAgentParams, originals: typeof http const agent = createPacProxyAgent(resolveP, { originalAgent: (!useProxySettings || isLocalhost || config === 'fallback') ? originalAgent : undefined, lookupProxyAuthorization: params.lookupProxyAuthorization, - keepAlive: ((originalAgent || originals.globalAgent) as { keepAlive?: boolean }).keepAlive, + // keepAlive: ((originalAgent || originals.globalAgent) as { keepAlive?: boolean }).keepAlive, // Skipping due to https://github.com/microsoft/vscode/issues/228872. }); agent.protocol = isHttps ? 'https:' : 'http:'; options.agent = agent diff --git a/tests/test-client/src/direct.test.ts b/tests/test-client/src/direct.test.ts index 86fc06d..ea09154 100644 --- a/tests/test-client/src/direct.test.ts +++ b/tests/test-client/src/direct.test.ts @@ -153,7 +153,8 @@ describe('Direct client', function () { }); assert.ok(seen, 'Original agent not called!'); }); - it('should reuse socket with agent', async function () { + it.skip('should reuse socket with agent', async function () { + // Skipping due to https://github.com/microsoft/vscode/issues/228872. // https://github.com/microsoft/vscode/issues/173861 const resolveProxy = vpa.createProxyResolver(directProxyAgentParams); const patchedHttps: typeof https = {