fix: cells not found
- change: disable log health check websocket Signed-off-by: pakintada@gmail.com <Pakin>
This commit is contained in:
parent
79a76f5c3e
commit
244a234833
2 changed files with 14 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue