MCPcopy Create free account
hub / github.com/Noumena-Network/code / startPingInterval

Method startPingInterval

src/remote/SessionsWebSocket.ts:300–312  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

298 }
299
300 private startPingInterval(): void {
301 this.stopPingInterval()
302
303 this.pingInterval = setInterval(() => {
304 if (this.ws && this.state === 'connected') {
305 try {
306 this.ws.ping?.()
307 } catch {
308 // Ignore ping errors, close handler will deal with connection issues
309 }
310 }
311 }, PING_INTERVAL_MS)
312 }
313
314 /**
315 * Stop ping interval

Callers 1

connectMethod · 0.95

Calls 1

stopPingIntervalMethod · 0.95

Tested by

no test coverage detected