agentkeepalive
Advanced tools
Comparing version 0.2.2 to 0.2.3
0.2.3 / 2014-10-16 | ||
================== | ||
* added isDestroyed function to check _destroyed as well (@retool) | ||
* fix https test | ||
0.2.2 / 2013-11-19 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -79,3 +79,3 @@ // Copyright Joyent, Inc. and other Node contributors. | ||
if (!socket.destroyed && | ||
if (!self.isDestroyed(socket) && | ||
self.requests[name] && self.requests[name].length) { | ||
@@ -93,3 +93,3 @@ self.requests[name].shift().onSocket(socket); | ||
req.shouldKeepAlive && | ||
!socket.destroyed && | ||
!self.isDestroyed(socket) && | ||
self.options.keepAlive) { | ||
@@ -245,5 +245,5 @@ var freeSockets = self.freeSockets[name]; | ||
var name = this.getName(options); | ||
debug('removeSocket', name, 'destroyed:', s.destroyed); | ||
debug('removeSocket', name, 'destroyed:', this.isDestroyed(s)); | ||
var sets = [this.sockets]; | ||
if (s.destroyed) { | ||
if (this.isDestroyed(s)) { | ||
// If the socket was destroyed, we need to remove it from the free buffers. | ||
@@ -326,2 +326,5 @@ sets.push(this.freeSockets); | ||
Agent.prototype.isDestroyed = function(socket){ | ||
return socket.destroyed || socket._destroyed; | ||
} | ||
exports.globalAgent = new Agent(); |
@@ -63,3 +63,3 @@ /**! | ||
if (!socket.destroyed && | ||
if (!self.isDestroyed(socket) && | ||
self.requests[name] && self.requests[name].length) { | ||
@@ -77,3 +77,3 @@ self.requests[name].shift().onSocket(socket); | ||
req.shouldKeepAlive && | ||
!socket.destroyed && | ||
!self.isDestroyed(socket) && | ||
self.options.keepAlive) { | ||
@@ -144,5 +144,5 @@ var freeSockets = self.freeSockets[name]; | ||
var name = this.getName(options); | ||
debug('removeSocket', name, 'destroyed:', s.destroyed); | ||
debug('removeSocket', name, 'destroyed:', this.isDestroyed(s)); | ||
if (s.destroyed && this.freeSockets[name]) { | ||
if (this.isDestroyed(s) && this.freeSockets[name]) { | ||
var index = this.freeSockets[name].indexOf(s); | ||
@@ -149,0 +149,0 @@ if (index !== -1) { |
{ | ||
"name": "agentkeepalive", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Missing keepalive http.Agent", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,7 +0,3 @@ | ||
# agentkeepalive | ||
# agentkeepalive [![Build Status](https://secure.travis-ci.org/TBEDP/agentkeepalive.png?branch=master)](http://travis-ci.org/TBEDP/agentkeepalive) [![Coverage Status](https://coveralls.io/repos/TBEDP/agentkeepalive/badge.png)](https://coveralls.io/r/TBEDP/agentkeepalive) | ||
[![Build Status](https://secure.travis-ci.org/TBEDP/agentkeepalive.png?branch=master)](http://travis-ci.org/TBEDP/agentkeepalive) [![Coverage Status](https://coveralls.io/repos/TBEDP/agentkeepalive/badge.png)](https://coveralls.io/r/TBEDP/agentkeepalive) | ||
[![NPM](https://nodei.co/npm/agentkeepalive.png?downloads=true)](https://nodei.co/npm/agentkeepalive/) | ||
![logo](https://raw.github.com/TBEDP/agentkeepalive/master/logo.png) | ||
@@ -8,0 +4,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63944
789
197