@senior-gestao-empresarial/angular-components 7.3.0 → 7.4.0

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.
@@ -7962,7 +7962,8 @@ var WebsocketService = /** @class */ (function () {
7962
7962
  this.disconnected$.next();
7963
7963
  };
7964
7964
  WebsocketService.prototype.handleOnWebSocketClose = function (data) {
7965
- if (data.reason && data.reason.toLowerCase().indexOf("go away") !== -1) {
7965
+ var _a, _b;
7966
+ if (((_a = data === null || data === void 0 ? void 0 : data.reason) === null || _a === void 0 ? void 0 : _a.toLowerCase().indexOf("go away")) !== -1) {
7966
7967
  this.lostConnection = true;
7967
7968
  this.handleError('AuthenticationError', new FrameImpl({
7968
7969
  command: data.type,
@@ -7972,6 +7973,16 @@ var WebsocketService = /** @class */ (function () {
7972
7973
  }));
7973
7974
  return;
7974
7975
  }
7976
+ if (((_b = data === null || data === void 0 ? void 0 : data.reason) === null || _b === void 0 ? void 0 : _b.toLowerCase().indexOf("cannot connect to server")) !== -1) {
7977
+ this.lostConnection = true;
7978
+ this.handleError('ConnectionError', new FrameImpl({
7979
+ command: data.type,
7980
+ headers: {
7981
+ message: data.reason
7982
+ }
7983
+ }));
7984
+ return;
7985
+ }
7975
7986
  if (data.wasClean) {
7976
7987
  return;
7977
7988
  }