socketcluster-client
Advanced tools
Comparing version 19.1.2 to 19.2.0
@@ -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": "*" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
216117
13
+ Addedag-auth@^2.1.0
+ Addedag-auth@2.1.0(transitive)
+ Addedbuffer-equal-constant-time@1.0.1(transitive)
+ Addedecdsa-sig-formatter@1.0.11(transitive)
+ Addedjsonwebtoken@9.0.2(transitive)
+ Addedjwa@1.4.1(transitive)
+ Addedjws@3.2.2(transitive)
+ Addedlodash.includes@4.3.0(transitive)
+ Addedlodash.isboolean@3.0.3(transitive)
+ Addedlodash.isinteger@4.0.4(transitive)
+ Addedlodash.isnumber@3.0.3(transitive)
+ Addedlodash.isplainobject@4.0.6(transitive)
+ Addedlodash.isstring@4.0.1(transitive)
+ Addedlodash.once@4.1.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addedsemver@7.6.3(transitive)
- Removedsc-errors@2.0.3(transitive)
Updatedag-request@^1.1.0
Updatedsc-errors@^3.0.0