@nsshunt/stsfhirclient 1.0.49 → 1.0.50

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.
@@ -5049,14 +5049,15 @@ class FhirSocketClient {
5049
5049
  }
5050
5050
  });
5051
5051
  __publicField(this, "WaitForSocketConnected", async () => {
5052
- if (this.socket.connected === true) {
5052
+ console.log(chalk.gray(`WaitForSocketConnected(): Waiting for socket connection [Start]`));
5053
+ if (this.socket && this.socket.connected === true) {
5053
5054
  return;
5054
5055
  }
5055
5056
  let connected = false;
5056
5057
  while (!connected) {
5057
5058
  console.log(chalk.gray(`WaitForSocketConnected(): Waiting for socket connection ...`));
5058
5059
  const socketRetVal = this.socket;
5059
- if (socketRetVal.connected === true) {
5060
+ if (socketRetVal && socketRetVal.connected === true) {
5060
5061
  connected = true;
5061
5062
  break;
5062
5063
  }