@vertexvis/stream-api 0.24.4-canary.4 → 0.24.4-canary.6

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.
@@ -49273,6 +49273,11 @@ var WebSocketClientImpl = /** @class */ (function () {
49273
49273
  var _this = this;
49274
49274
  return tslib.__generator(this, function (_a) {
49275
49275
  id = utils.UUID.create();
49276
+ // Ensure that any existing websocket connection has been closed prior
49277
+ // to opening a new one to ensure we don't leave open connections.
49278
+ if (this.webSocket != null) {
49279
+ this.close();
49280
+ }
49276
49281
  this.webSocket = new WebSocket(descriptor.url, descriptor.protocols);
49277
49282
  this.webSocket.binaryType = 'arraybuffer';
49278
49283
  return [2 /*return*/, new Promise(function (resolve, reject) {