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

socketcluster-client

Package Overview
Dependencies
Maintainers
1
Versions
236
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socketcluster-client - npm Package Compare versions

Comparing version 19.1.2 to 19.2.0

6

lib/clientsocket.js

@@ -619,3 +619,3 @@ const StreamDemux = require('stream-demux');

AGClientSocket.prototype._abortAllPendingEventsDueToBadConnection = function (failureType) {
AGClientSocket.prototype._abortAllPendingEventsDueToBadConnection = function (failureType, code, reason) {
let currentNode = this._outboundBuffer.head;

@@ -637,3 +637,3 @@ let nextNode;

let errorMessage = `Event ${eventObject.event} was aborted due to a bad connection`;
let error = new BadConnectionError(errorMessage, failureType);
let error = new BadConnectionError(errorMessage, failureType, code, reason);

@@ -681,3 +681,3 @@ callback.call(eventObject, error, eventObject);

this._abortAllPendingEventsDueToBadConnection(openAbort ? 'connectAbort' : 'disconnect');
this._abortAllPendingEventsDueToBadConnection(openAbort ? 'connectAbort' : 'disconnect', code, reason);

@@ -684,0 +684,0 @@ // Try to reconnect

@@ -228,3 +228,3 @@ const AGRequest = require('ag-request');

AGTransport.prototype._abortAllPendingEventsDueToBadConnection = function (failureType) {
AGTransport.prototype._abortAllPendingEventsDueToBadConnection = function (failureType, code, reason) {
Object.keys(this._callbackMap || {}).forEach((i) => {

@@ -238,3 +238,3 @@ let eventObject = this._callbackMap[i];

let errorMessage = `Event ${eventObject.event} was aborted due to a bad connection`;
let badConnectionError = new BadConnectionError(errorMessage, failureType);
let badConnectionError = new BadConnectionError(errorMessage, failureType, code, reason);

@@ -265,10 +265,10 @@ let callback = eventObject.callback;

this.state = this.CLOSED;
this._abortAllPendingEventsDueToBadConnection('disconnect');
this._abortAllPendingEventsDueToBadConnection('disconnect', code, reason);
this._onCloseHandler({code, reason});
} else if (this.state === this.CONNECTING) {
this.state = this.CLOSED;
this._abortAllPendingEventsDueToBadConnection('connectAbort');
this._abortAllPendingEventsDueToBadConnection('connectAbort', code, reason);
this._onOpenAbortHandler({code, reason});
} else if (this.state === this.CLOSED) {
this._abortAllPendingEventsDueToBadConnection('connectAbort');
this._abortAllPendingEventsDueToBadConnection('connectAbort', code, reason);
}

@@ -275,0 +275,0 @@ };

{
"name": "socketcluster-client",
"description": "SocketCluster JavaScript client",
"version": "19.1.2",
"version": "19.2.0",
"homepage": "https://socketcluster.io/",

@@ -27,4 +27,5 @@ "contributors": [

"dependencies": {
"ag-auth": "^2.1.0",
"ag-channel": "^5.0.0",
"ag-request": "^1.0.1",
"ag-request": "^1.1.0",
"async-stream-emitter": "^7.0.1",

@@ -34,3 +35,3 @@ "buffer": "^5.2.1",

"linked-list": "^2.1.0",
"sc-errors": "^2.0.3",
"sc-errors": "^3.0.0",
"sc-formatter": "^4.0.0",

@@ -54,4 +55,4 @@ "stream-demux": "^10.0.1",

"rollup": "^3.28.1",
"socketcluster-server": "19.x.x"
"socketcluster-server": "*"
}
}
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