MCPcopy Create free account
hub / github.com/bytebase/bytebase / cleanup

Function cleanup

frontend/src/react/components/monaco/lsp-client.ts:95–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93
94const useHeartbeat = (ws: WebSocket) => {
95 const cleanup = () => {
96 clearTimeout(conn.heartbeat.timer);
97 conn.heartbeat = {
98 timer: undefined,
99 counter: 0,
100 timestamp: 0,
101 };
102 emit();
103 };
104
105 ws.addEventListener("error", cleanup);
106 ws.addEventListener("close", cleanup);

Callers

nothing calls this directly

Calls 1

emitFunction · 0.70

Tested by

no test coverage detected