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