vani-meeting-client-native 0.2.4 → 0.2.5

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.
@@ -92,6 +92,7 @@ export declare class WebsocketHandler extends Base {
92
92
  private setUpTry;
93
93
  private pongData;
94
94
  private lastPingTimeStamp;
95
+ private isNormalConnectionCalledWhileInPreconnectProcess;
95
96
  protected onObjectCreated(): void;
96
97
  cleanup(): Promise<void>;
97
98
  startSocketConnection(isForPreConnect?: boolean, url?: string): Promise<void>;
@@ -147,6 +147,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
147
147
  _this.setUpTry = 0;
148
148
  _this.pongData = undefined;
149
149
  _this.lastPingTimeStamp = 0;
150
+ _this.isNormalConnectionCalledWhileInPreconnectProcess = false;
150
151
  _this.onCloseTheRoomForcefully = function (data) { return __awaiter(_this, void 0, void 0, function () {
151
152
  var _a, _b;
152
153
  return __generator(this, function (_c) {
@@ -177,6 +178,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
177
178
  }
178
179
  catch (err) {
179
180
  }
181
+ this.isNormalConnectionCalledWhileInPreconnectProcess = false;
180
182
  this.loadBalancerIpAddressForWebSocket = undefined;
181
183
  this.isEnded = true;
182
184
  if (this.wss) {
@@ -248,6 +250,9 @@ var WebsocketHandler = /** @class */ (function (_super) {
248
250
  var _this = this;
249
251
  return __generator(this, function (_d) {
250
252
  if (this.isEnded === true || this.isWebSocketConnectionInProgress) {
253
+ if (!isForPreConnect) {
254
+ this.isNormalConnectionCalledWhileInPreconnectProcess = true;
255
+ }
251
256
  return [2 /*return*/];
252
257
  }
253
258
  if (!this.wss || (isForceFully && this.isWebScoketConnectedWithoutSetup() === false)) {
@@ -290,12 +295,13 @@ var WebsocketHandler = /** @class */ (function (_super) {
290
295
  _this.isSetUpDone = false;
291
296
  _this.websocketConnectionUrl = url_1;
292
297
  _this.socketCheckTimeout = undefined;
293
- if (!isForPreConnect) {
298
+ if (!isForPreConnect || _this.isNormalConnectionCalledWhileInPreconnectProcess) {
294
299
  _this.onSocketConnected();
295
300
  }
296
301
  else {
297
302
  console.log("WebSocket connected in pre connect");
298
303
  }
304
+ _this.isNormalConnectionCalledWhileInPreconnectProcess = false;
299
305
  };
300
306
  this.wss.onmessage = function (event) {
301
307
  _this.isWebSocketConnectionInProgress = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client-native",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",