From 8fb6d6dd641d1f96bdbcdabb0856aa9f07796d8a Mon Sep 17 00:00:00 2001 From: Luca Date: Tue, 24 Sep 2024 15:15:50 +0200 Subject: [PATCH] Hide error for signalr connection --- src/js/UserHub.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/js/UserHub.js b/src/js/UserHub.js index d61eb9a..634ce0f 100644 --- a/src/js/UserHub.js +++ b/src/js/UserHub.js @@ -48,8 +48,6 @@ export default class ws { }) }); - console.log("[SIGNALR] Device Status"); - emitter.emit('deviceStatus', { states }); }); @@ -90,8 +88,8 @@ export default class ws { start() { this.connection.start().catch((err) => { - if(err.message && err.message.includes(`Status code '401'`)) { - utils.clearLogin(); + if(err.message && err.message.includes(`Error: Failed to start the connection: Error: WebSocket failed to connect`)) { + // We previously cleared login here, we dont need to do that anymore } else toastr.error(err, "User Hub"); }); }