@nsshunt/stsfhirclient 1.0.50 → 1.0.52

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.
@@ -5052,19 +5052,24 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
5052
5052
  });
5053
5053
  __publicField(this, "WaitForSocketConnected", async () => {
5054
5054
  console.log(chalk.gray(`WaitForSocketConnected(): Waiting for socket connection [Start]`));
5055
- if (this.socket && this.socket.connected === true) {
5056
- return;
5055
+ console.log(chalk.gray(`WaitForSocketConnected(): Attempting to get socket`));
5056
+ const socket = __privateGet(this, _socketUtils).GetSocket(__privateGet(this, _options2).socketClientName);
5057
+ if (socket) {
5058
+ console.log(chalk.gray(`WaitForSocketConnected(): Socket obtained`));
5059
+ } else {
5060
+ console.log(chalk.gray(`WaitForSocketConnected(): No socket obtained yet ...`));
5057
5061
  }
5058
5062
  let connected = false;
5059
5063
  while (!connected) {
5060
5064
  console.log(chalk.gray(`WaitForSocketConnected(): Waiting for socket connection ...`));
5061
- const socketRetVal = this.socket;
5065
+ const socketRetVal = __privateGet(this, _socketUtils).GetSocket(__privateGet(this, _options2).socketClientName);
5062
5066
  if (socketRetVal && socketRetVal.connected === true) {
5063
5067
  connected = true;
5064
5068
  break;
5065
5069
  }
5066
5070
  await stsutils.Sleep(100);
5067
5071
  }
5072
+ console.log(chalk.gray(`WaitForSocketConnected(): Waiting for socket connection [End]`));
5068
5073
  });
5069
5074
  __publicField(this, "CreateResource", async (resource, domainResource) => {
5070
5075
  await this.WaitForSocketConnected();
@@ -5307,9 +5312,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
5307
5312
  __privateSet(this, _options2, options);
5308
5313
  __privateSet(this, _socketUtils, new SocketIoClientHelper(__privateGet(this, _options2).socketIoClientHelperOptions));
5309
5314
  const clientName = v4();
5310
- setTimeout(() => {
5311
- __privateGet(this, _SetupWSSClient).call(this, clientName, []);
5312
- }, 500);
5315
+ __privateGet(this, _SetupWSSClient).call(this, clientName, []);
5313
5316
  }
5314
5317
  get socket() {
5315
5318
  return __privateGet(this, _socketUtils).GetSocket(__privateGet(this, _options2).socketClientName);