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

infinity-agent

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

infinity-agent - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

4

index.js

@@ -8,4 +8,4 @@ 'use strict';

function agent(options) {
// if defaultMaxSockets is Infinity - then we should use default agent
if (http.Agent.defaultMaxSockets === Infinity) {
// if defaultMaxSockets is not default 5 - then we should use default agent
if (http.Agent.defaultMaxSockets !== 5) {
return undefined;

@@ -12,0 +12,0 @@ }

{
"name": "infinity-agent",
"version": "0.1.0",
"version": "0.2.0",
"description": "Creates HTTP/HTTPS Agent with Infinity maxSockets",

@@ -5,0 +5,0 @@ "main": "index.js",

# infinity-agent [![Build Status](https://travis-ci.org/floatdrop/infinity-agent.svg?branch=master)](https://travis-ci.org/floatdrop/infinity-agent)
Returns HTTP/HTTPS agent based on URL or options.
Returns HTTP/HTTPS agent with maxSockets set to Infinity (based on URL or options).
__Motivation__: Node 0.10.x is using 5 sockets limit on one host:port pair, but in 0.11.x this is fixed with defaultMaxSockets set to Infinity. To backport this behaviour you can use this module.
## Usage

@@ -24,3 +26,3 @@

* `undefined`, if http.Agent.defaultMaxSockets is `Infinity`
* `undefined`, if http.Agent.defaultMaxSockets is not `5`
* `agent.httpAgent`, if `options.protocol === 'http:'` (`agent.httpsAgent` otherwise)

@@ -27,0 +29,0 @@ * New instance of HTTPS agent with `options`, if they contains any of [tls options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback)

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