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

cueball

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cueball - npm Package Compare versions

Comparing version 2.2.7 to 2.2.8

38

lib/agent.js

@@ -290,2 +290,3 @@ /*

conn = connh;
socket.once('free', onFree);

@@ -301,2 +302,27 @@ socket.once('close', onClose);

req.removeListener('abort', onAbort);
/*
* The node http framework (especially in 0.10.x) can leave
* handlers on socket events when the socket has closed and the
* request completed normally (e.g. the remote server doesn't
* support keep-alive, or we exceeded its maximum time).
*
* To avoid a spurious warning here, we disable the handler
* leak check.
*/
conn.disableReleaseLeakCheck();
/*
* Unfortunately, there is no way to distinguish between a
* 'close' event coming out of a socket where the request
* succeeded, and one coming out of a socket where it closed
* prematurely and the HTTP-level request failed. Node does not
* actually have any way to tell the difference between these
* (and actually doesn't know whether a request "ended early"
* at all, since it doesn't keep track of Content-Length
* properly, especially in 0.10.x).
*
* As a result, if we get a 'close' event before any other
* event happens, we give it the benefit of the doubt and
* don't induce a cueball-level backoff. We do this by always
* calling .release() instead of .close() on the handle here.
*/
conn.release();

@@ -329,9 +355,13 @@ conn = undefined;

}
/*
* Called when the http framework wants to notify us that the request
* did an Upgrade or similar, and the socket is now being used for
* other purposes (and won't be available for more HTTP requests).
*
* We keep the lease open until 'close' is emitted, and take off all
* our other handlers.
*/
function onAgentRemove() {
sock.removeListener('close', onClose);
sock.removeListener('free', onFree);
req.removeListener('abort', onAbort);
conn.close();
conn = undefined;
sock = undefined;
}

@@ -338,0 +368,0 @@ };

@@ -501,2 +501,3 @@ /*

this.ch_lastError = undefined;
this.ch_doReleaseLeakCheck = true;

@@ -519,2 +520,6 @@ FSM.call(this, 'waiting');

CueBallClaimHandle.prototype.disableReleaseLeakCheck = function () {
this.ch_doReleaseLeakCheck = false;
};
CueBallClaimHandle.prototype.on = function (evt) {

@@ -691,2 +696,5 @@ if (evt === 'readable' || evt === 'close') {

if (!this.ch_doReleaseLeakCheck)
return;
var conn = this.ch_connection;

@@ -693,0 +701,0 @@ var self = this;

2

package.json
{
"name": "cueball",
"version": "2.2.7",
"version": "2.2.8",
"description": "manage a pool of connections to a multi-node service where nodes are listed in DNS",

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

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