Closed JadenSimon closed 3 weeks ago
@JadenSimon Thanks for the code snippet! We need to pass on the keepAlive flag to the VS Code proxy agent.
Note that triggering the second request in the end
listener of the first might miss the existing socket because that hasn't made it to the queue of reusable sockets yet.
Also: VS Code is using a newer Electron version with Node.js 20 and that has keepAlive enabled by default.
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
https.get
orhttps.request
with an agent set to keep connections alivehttp.proxySupport
setting tooverride
(the default)The following code snippet should help demonstrate this problem with notes describing what conditions are needed for connections to persist:
This issue likely originates from here. I'm not entirely sure why an explicit header is needed, but it might be because the proxy patch bypasses logic that would normally set the header. This line appears to be called even when
http.proxySupport
is set tooff
.