Compare commits

...

6 Commits

Author SHA1 Message Date
c6fa540543 2.0.7 2022-08-01 17:10:11 +02:00
1891b54389 fix(core): update 2022-08-01 17:10:11 +02:00
fee8443af1 2.0.6 2022-07-30 18:43:11 +02:00
c48f956ae3 fix(core): update 2022-07-30 18:43:10 +02:00
4a4b64a2c4 2.0.5 2022-07-30 02:01:20 +02:00
43d4b47782 fix(core): update 2022-07-30 02:01:20 +02:00
4 changed files with 14 additions and 11 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@pushrocks/smartrequest",
"version": "2.0.4",
"version": "2.0.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@pushrocks/smartrequest",
"version": "2.0.4",
"version": "2.0.7",
"license": "MIT",
"dependencies": {
"@pushrocks/smartpromise": "^3.1.7",

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartrequest",
"version": "2.0.4",
"version": "2.0.7",
"private": false,
"description": "dropin replacement for request",
"main": "dist_ts/index.js",

View File

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

View File

@ -59,17 +59,18 @@ const parseSocketPathAndRoute = (stringToParseArg: string) => {
*/
const httpAgent = new plugins.agentkeepalive({
keepAlive: true,
maxFreeSockets: 1,
maxFreeSockets: 10,
maxSockets: 100,
maxTotalSockets: 1000,
timeout: 60000,
});
/**
* a custom http agent to make sure we can set custom keepAlive options for speedy subsequent calls
*/
const httpAgentKeepAliveFalse = new plugins.https.Agent({
maxFreeSockets: 0,
keepAlive: false
const httpAgentKeepAliveFalse = new plugins.agentkeepalive({
keepAlive: false,
timeout: 60000
});
/**
@ -77,17 +78,18 @@ const httpAgentKeepAliveFalse = new plugins.https.Agent({
*/
const httpsAgent = new plugins.agentkeepalive.HttpsAgent({
keepAlive: true,
maxFreeSockets: 1,
maxFreeSockets: 10,
maxSockets: 100,
maxTotalSockets: 1000,
timeout: 60000
});
/**
* a custom https agent to make sure we can set custom keepAlive options for speedy subsequent calls
*/
const httpsAgentKeepAliveFalse = new plugins.agentkeepalive.HttpsAgent({
maxFreeSockets: 0,
keepAlive: false
keepAlive: false,
timeout: 60000
});
export let request = async (
@ -185,6 +187,7 @@ export let request = async (
// lets handle an error
requestToFire.on('error', (e) => {
console.error(e);
requestToFire.destroy();
});
const result = await done.promise;