@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.
@@ -8168,7 +8168,8 @@
8168
8168
  this.disconnected$.next();
8169
8169
  };
8170
8170
  WebsocketService.prototype.handleOnWebSocketClose = function (data) {
8171
- if (data.reason && data.reason.toLowerCase().indexOf("go away") !== -1) {
8171
+ var _a, _b;
8172
+ if (((_a = data === null || data === void 0 ? void 0 : data.reason) === null || _a === void 0 ? void 0 : _a.toLowerCase().indexOf("go away")) !== -1) {
8172
8173
  this.lostConnection = true;
8173
8174
  this.handleError('AuthenticationError', new stompjs.FrameImpl({
8174
8175
  command: data.type,
@@ -8178,6 +8179,16 @@
8178
8179
  }));
8179
8180
  return;
8180
8181
  }
8182
+ 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) {
8183
+ this.lostConnection = true;
8184
+ this.handleError('ConnectionError', new stompjs.FrameImpl({
8185
+ command: data.type,
8186
+ headers: {
8187
+ message: data.reason
8188
+ }
8189
+ }));
8190
+ return;
8191
+ }
8181
8192
  if (data.wasClean) {
8182
8193
  return;
8183
8194
  }