diff --git a/bin/commands/env.js b/bin/commands/env.js index 435aa8e..076126c 100644 --- a/bin/commands/env.js +++ b/bin/commands/env.js @@ -4,12 +4,19 @@ import { Agent as HttpsAgent } from 'https'; import yargsInteractive from 'yargs-interactive'; const httpAgent = new HttpAgent({ - rejectUnauthorized: false -}) + keepAlive: true, + maxSockets: 8, + maxFreeSockets: 4, + keepAliveMsecs: 10_000 +}); const httpsAgent = new HttpsAgent({ + keepAlive: true, + maxSockets: 8, + maxFreeSockets: 4, + keepAliveMsecs: 10_000, rejectUnauthorized: false -}) +}); export function getAgent(protocol) { return protocol === 'http' ? httpAgent : httpsAgent; @@ -152,4 +159,4 @@ async function changeEnv(argv) { updateConfig(); console.log(`Your current environment is now ${getConfig().current.env}`); } -} \ No newline at end of file +}