|
@@ -42,6 +42,7 @@ function sendAMessage(name, data) {
|
|
|
}
|
|
|
|
|
|
export const socketErrDialog = ref(false)
|
|
|
+
|
|
|
export function initWebSocket(sid, force) {
|
|
|
if ('WebSocket' in window) {
|
|
|
if (webSocket === null || force) {
|
|
@@ -64,10 +65,10 @@ export function initWebSocket(sid, force) {
|
|
|
}
|
|
|
|
|
|
webSocket.onclose = function () {
|
|
|
- socketErrDialog.value = true
|
|
|
if (router.currentRoute.value.path === '/login') {
|
|
|
location.reload()
|
|
|
}
|
|
|
+ socketErrDialog.value = true
|
|
|
webSocket = null
|
|
|
let sid
|
|
|
if (router.currentRoute.value.path === '/triageRoomScreen') {
|