@nxtedition/deepstream.io-client-js 23.4.55 → 23.4.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/deepstream.io-client-js",
3
- "version": "23.4.55",
3
+ "version": "23.4.56",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "bugs": {
@@ -130,12 +130,16 @@ Connection.prototype.send = function (message) {
130
130
  }
131
131
 
132
132
  if (
133
- this._state === C.CONNECTION_STATE.OPEN &&
134
- this._endpoint.readyState === this._endpoint.OPEN
133
+ this._state !== C.CONNECTION_STATE.OPEN ||
134
+ this._endpoint.readyState !== this._endpoint.OPEN
135
135
  ) {
136
- this.emit('send', message)
137
- this._endpoint.send(message)
136
+ return false
138
137
  }
138
+
139
+ this.emit('send', message)
140
+ this._endpoint.send(message)
141
+
142
+ return true
139
143
  }
140
144
 
141
145
  Connection.prototype._submit = function (message) {