agent-base
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -103,5 +103,2 @@ | ||
req.onSocket(socket); | ||
if (typeof socket.unref === 'function') { | ||
socket.unref(); | ||
} | ||
} | ||
@@ -108,0 +105,0 @@ }); |
2.1.1 / 2017-05-30 | ||
================== | ||
* Revert [fe2162e0ba18123f5b301cba4de1e9dd74e437cd](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [270bdc92eb8e3bd0444d1e5266e8e9390aeb3095](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7) | ||
2.1.0 / 2017-05-26 | ||
@@ -3,0 +8,0 @@ ================== |
{ | ||
"name": "agent-base", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Turn a function into an `http.Agent` instance", | ||
@@ -5,0 +5,0 @@ "main": "agent.js", |
@@ -248,25 +248,2 @@ | ||
}); | ||
it('has no any dangling sockets', function (done) { | ||
// unref is not supported for node < 0.9.1 | ||
if (semver.lt(process.version, '0.9.1')) { | ||
return done() | ||
} | ||
var agent = new Agent(function (req, opts, fn) { | ||
fn(null, net.connect(opts)); | ||
}); | ||
function getActiveSockets() { | ||
return process._getActiveHandles().filter(function (handler) { | ||
return handler.constructor.name === 'Socket' | ||
}); | ||
} | ||
// Some sockets are created outside of this test | ||
const initialSockets = getActiveSockets() | ||
http.get({ | ||
host: 'google.com', | ||
agent: agent | ||
}); | ||
assert.equal(initialSockets.length, getActiveSockets().length); | ||
done(); | ||
}) | ||
}); | ||
@@ -273,0 +250,0 @@ |
25432
538