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