fix(core): update

This commit is contained in:
Philipp Kunz 2022-07-30 02:01:20 +02:00
parent 6d970cb925
commit 43d4b47782
2 changed files with 3 additions and 8 deletions

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@pushrocks/smartrequest', name: '@pushrocks/smartrequest',
version: '2.0.4', version: '2.0.5',
description: 'dropin replacement for request' description: 'dropin replacement for request'
} }

View File

@ -59,16 +59,13 @@ const parseSocketPathAndRoute = (stringToParseArg: string) => {
*/ */
const httpAgent = new plugins.agentkeepalive({ const httpAgent = new plugins.agentkeepalive({
keepAlive: true, keepAlive: true,
maxFreeSockets: 1, maxFreeSockets: 10,
maxSockets: 100,
maxTotalSockets: 1000,
}); });
/** /**
* a custom http agent to make sure we can set custom keepAlive options for speedy subsequent calls * a custom http agent to make sure we can set custom keepAlive options for speedy subsequent calls
*/ */
const httpAgentKeepAliveFalse = new plugins.https.Agent({ const httpAgentKeepAliveFalse = new plugins.https.Agent({
maxFreeSockets: 0,
keepAlive: false keepAlive: false
}); });
@ -77,9 +74,7 @@ const httpAgentKeepAliveFalse = new plugins.https.Agent({
*/ */
const httpsAgent = new plugins.agentkeepalive.HttpsAgent({ const httpsAgent = new plugins.agentkeepalive.HttpsAgent({
keepAlive: true, keepAlive: true,
maxFreeSockets: 1, maxFreeSockets: 10,
maxSockets: 100,
maxTotalSockets: 1000,
}); });
/** /**