MCPcopy
hub / github.com/CapSoftware/Cap / stopSocket

Function stopSocket

apps/desktop/src/routes/camera.tsx:572–584  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

570 };
571
572 const stopSocket = () => {
573 if (reconnectTimeout) {
574 clearTimeout(reconnectTimeout);
575 reconnectTimeout = undefined;
576 }
577
578 if (stallCheckInterval) {
579 clearInterval(stallCheckInterval);
580 stallCheckInterval = undefined;
581 }
582
583 closeSocket();
584 };
585
586 const startSocket = () => {
587 if (ws || !isWindowVisible()) return;

Callers 1

LegacyCameraPreviewPageFunction · 0.85

Calls 1

closeSocketFunction · 0.70

Tested by

no test coverage detected