fix: cells not found

- change: disable log health check websocket

Signed-off-by: pakintada@gmail.com <Pakin>
This commit is contained in:
pakintada@gmail.com 2026-05-27 08:15:45 +07:00
parent 79a76f5c3e
commit 244a234833
2 changed files with 14 additions and 7 deletions

View file

@ -10,6 +10,7 @@ import { permission } from './permissions';
let socket: WebSocket | null = null;
let reconnectTimeout: any;
let socketCheck: any;
const ENABLE_WS_DEBUG: boolean = false;
export const socketConnectionOfflineCount = writable<number>(0);
@ -55,7 +56,7 @@ export function connectToWebsocket(id_token?: string) {
}
// heartbeat 10s
setInterval(() => {
socketCheck = setInterval(() => {
if (get(socketAlreadySendHeartbeat) > 0) {
let heartbeat_may_offline_count = get(socketConnectionOfflineCount);
@ -103,6 +104,8 @@ export function connectToWebsocket(id_token?: string) {
socketStore.set(null);
socket = null;
clearInterval(socketCheck);
if (auth.currentUser && !socket) {
console.log('try reconnect websocket ...');
// retry again