Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

limits

Package Overview
Dependencies
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

limits - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

3

lib/index.js

@@ -197,2 +197,4 @@ /*

exposeGlobalTimers(config);
//set MaxSocket at module load time coz its used for http client request
setDefaultMaxSockets(config);
}

@@ -224,2 +226,3 @@

//Set it again since a incoming request can have a different config value for max-socket
setDefaultMaxSockets(conf);

@@ -226,0 +229,0 @@

2

package.json

@@ -5,3 +5,3 @@ {

"author": "Vinit Sacheti<vsacheti@yahoo-inc.com>",
"version": "0.0.6",
"version": "0.0.7",
"devDependencies": {

@@ -8,0 +8,0 @@ "ytestrunner": "*",

@@ -413,5 +413,33 @@ var http = require('http'),

},
'Verify that globalAgent maxSockets is set' : function() {
http.globalAgent.maxSockets = 10;
var testee = mod_limits({
"enable" : "true",
"max_sockets" : 0
});
Assert.areEqual(10, http.globalAgent.maxSockets);
testee = mod_limits({
"enable" : "true",
"max_sockets" : 100
});
Assert.areEqual(100, http.globalAgent.maxSockets);
var req = getReq(),
resp = getResp(),
next = false;
req.mod_config = {
"max_sockets" : 1000
}
testee(req, resp, function() {
next = true;
});
Assert.areEqual(1000, http.globalAgent.maxSockets);
}
}));
// vim:ts=4 sw=4 et

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc