don't retry null token fixes amidaware/tacticalrmm#1199

This commit is contained in:
wh1te909
2023-05-17 07:03:13 +00:00
parent 6ea3a053f2
commit 827e81dcda

View File

@@ -262,6 +262,11 @@ export default {
// moved computed token inside the function since it is not refreshing
// when ws is closed causing ws to connect with expired token
const token = computed(() => store.state.token);
if (!token.value) {
console.log("Access token is null or invalid, not setting up WebSocket");
return;
}
console.log("Starting websocket");
let url = getWSUrl("dashinfo", token.value);
ws.value = new WebSocket(url);