From 615e33f396f6a98bc17e02c5ccbf278e25d98ba6 Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Fri, 29 Mar 2019 11:37:47 +0100 Subject: [PATCH] Add websocket debug output Adds socket.warn functions to have a higher change to find errors --- client/src/app/core/core-services/websocket.service.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/src/app/core/core-services/websocket.service.ts b/client/src/app/core/core-services/websocket.service.ts index 09e7c9360..2d85513cb 100644 --- a/client/src/app/core/core-services/websocket.service.ts +++ b/client/src/app/core/core-services/websocket.service.ts @@ -218,6 +218,14 @@ export class WebsocketService { this._closeEvent.emit(); }); }; + + this.websocket.onerror = (event: ErrorEvent) => { + // place for proper error handling and debugging. + // Required to get more information about errors + this.zone.run(() => { + console.warn('Websocket is on Error state. Error: ', event); + }); + }; } /**