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

yakaa

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yakaa - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

.npmignore

38

http.js

@@ -112,17 +112,10 @@ 'use strict';

// Avoid duplicate timeout events by removing timeout listeners set
// on socket by previous requests. node does not do this normally
// because it assumes sockets are too short-lived for it to matter.
// It becomes a problem when sockets are being reused. Fixed sometime
// around Node 0.10.0.
//
// See https://github.com/joyent/node/commit/451ff1540
if (self.keepAliveTimeoutMsecs &&
socket._events &&
Array.isArray(socket._events.timeout)) {
socket.removeAllListeners('timeout');
// Restore the socket's setTimeout() that was remove as collateral
// damage.
socket.setTimeout(self.keepAliveTimeoutMsecs, socket._reapTimeout);
// set timeout on idle sockets
if (options.keepAliveTimeoutMsecs !== undefined) {
socket._yakaa_timeout = setTimeout(function () {
self.emit('yakaa_destroy');
socket.destroySoon();
}, options.keepAliveTimeoutMsecs);
}
}

@@ -187,2 +180,8 @@ } else {

// mark socket as non-idle so it doesn't get destroyed mid-request
if (socket._yakaa_timeout) {
clearTimeout(socket._yakaa_timeout);
delete socket._yakaa_timeout;
}
// don't leak

@@ -240,11 +239,2 @@ if (!this.freeSockets[name].length)

if (options.keepAliveTimeoutMsecs) {
s._reapTimeout = function () {
debug('_reapTimeout, socket destroy()');
s.destroy();
self.removeSocket(s, options);
};
s.setTimeout(options.keepAliveTimeoutMsecs, s._reapTimeout);
}
function onFree() {

@@ -283,2 +273,4 @@ self.emit('free', s, options);

this.emit('yakaa_remove', s);
// If the socket was destroyed, remove it from the free buffers too.

@@ -285,0 +277,0 @@ if (s.destroyed)

{
"name": "yakaa",
"version": "0.0.1",
"version": "1.0.0",
"description": "Yet Another Keep-Alive Agent",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "tap test"
},

@@ -26,3 +26,6 @@ "repository": {

},
"homepage": "https://github.com/newrelic/yakaa"
"homepage": "https://github.com/newrelic/yakaa",
"devDependencies": {
"tap": "^0.4.8"
}
}
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