@realsee/live 0.5.0-alpha.2 → 0.5.0-alpha.3

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.
@@ -1238,7 +1238,12 @@ class RobustWebSocket extends Subscribe {
1238
1238
  * @param data
1239
1239
  * @returns
1240
1240
  */
1241
- this.send = (data) => { var _a; return (_a = this._realWebSocket) === null || _a === void 0 ? void 0 : _a.send(data); };
1241
+ this.send = (data) => {
1242
+ var _a, _b, _c;
1243
+ if (((_a = this._realWebSocket) === null || _a === void 0 ? void 0 : _a.readyState) === ((_b = this._realWebSocket) === null || _b === void 0 ? void 0 : _b.OPEN)) {
1244
+ (_c = this._realWebSocket) === null || _c === void 0 ? void 0 : _c.send(data);
1245
+ }
1246
+ };
1242
1247
  /**
1243
1248
  * 关闭连接
1244
1249
  * @param code 代码