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.0 to 2.2.1

42

lib/connection-fsm.js

@@ -506,2 +506,28 @@ /*

Object.defineProperty(CueBallClaimHandle.prototype, 'writable', {
get: function () {
throw (new mod_errors.ClaimHandleMisusedError());
}
});
Object.defineProperty(CueBallClaimHandle.prototype, 'readable', {
get: function () {
throw (new mod_errors.ClaimHandleMisusedError());
}
});
CueBallClaimHandle.prototype.on = function (evt) {
if (evt === 'readable' || evt === 'close') {
throw (new mod_errors.ClaimHandleMisusedError());
}
return (EventEmitter.prototype.on.apply(this, arguments));
};
CueBallClaimHandle.prototype.once = function (evt) {
if (evt === 'readable' || evt === 'close') {
throw (new mod_errors.ClaimHandleMisusedError());
}
return (EventEmitter.prototype.once.apply(this, arguments));
};
CueBallClaimHandle.prototype.try = function (slot) {

@@ -886,2 +912,7 @@ mod_assert.ok(this.isInState('waiting'), 'ClaimHandle#try may only ' +

ConnectionSlotFSM.prototype.isRunningPing = function () {
return (this.isInState('busy') && this.csf_handle &&
this.csf_handle.csf_pinger);
};
ConnectionSlotFSM.prototype.state_init = function (S) {

@@ -1021,3 +1052,11 @@ S.on(this, 'startAsserted', function () {

'at cueball.doPingCheck\n',
callback: checker,
callback: function pingCheckAdapter(err, hdl, conn) {
/*
* Since we give an infinite timeout and never call
* .fail() on the handle, we should never be called
* with a non-null "err" parameter here.
*/
mod_assert.strictEqual(err, null);
checker(hdl, conn);
},
log: fsm.csf_log,

@@ -1027,2 +1066,3 @@ claimTimeout: Infinity

var handle = new CueBallClaimHandle(hdlOpts);
handle.csf_pinger = true;
/*

@@ -1029,0 +1069,0 @@ * Don't bother handling a return to "waiting" state here: if we

@@ -15,3 +15,4 @@ /*

PoolFailedError: PoolFailedError,
PoolStoppingError: PoolStoppingError
PoolStoppingError: PoolStoppingError,
ClaimHandleMisusedError: ClaimHandleMisusedError
};

@@ -22,2 +23,12 @@

function ClaimHandleMisusedError() {
if (Error.captureStackTrace)
Error.captureStackTrace(this, ClaimHandleMisusedError);
this.name = 'ClaimHandleMisusedError';
this.message = 'CueBall claim handle used as if it was a ' +
'socket. Check the order and number of arguments in ' +
'your claim callbacks.';
}
mod_util.inherits(ClaimHandleMisusedError, Error);
function ClaimTimeoutError(pool) {

@@ -24,0 +35,0 @@ if (Error.captureStackTrace)

4

lib/pool.js

@@ -650,4 +650,6 @@ /*

*/
if (newState === 'ping' && !fsm.p_initq_node)
if (newState === 'busy' && fsm.isRunningPing() &&
!fsm.p_initq_node) {
fsm.p_initq_node = self.p_initq.push(fsm);
}

@@ -654,0 +656,0 @@ if (newState === 'failed') {

{
"name": "cueball",
"version": "2.2.0",
"version": "2.2.1",
"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

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