request: with $HTTP(S)_PROXY, keep connections alive for 10s

This commit is contained in:
Jannis R 2023-07-25 16:08:51 +02:00
parent 5ce0129c36
commit 793cc9eee5
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -26,6 +26,7 @@ let getAgent = () => plainAgent
if (proxyAddress) { if (proxyAddress) {
const agent = new ProxyAgent(proxyAddress, { const agent = new ProxyAgent(proxyAddress, {
keepAlive: true, keepAlive: true,
keepAliveMsecs: 10 * 1000, // 10s
}) })
getAgent = () => agent getAgent = () => agent
} else if (localAddresses) { } else if (localAddresses) {