MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / scheduleReconnect

Function scheduleReconnect

packages/react/src/api/oauth-popup.ts:311–317  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

309 // the previous one settles. A long-polling server may hold each request for
310 // many seconds, so a fixed interval would stack overlapping requests.
311 const scheduleReconnect = () => {
312 if (settled) return;
313 pollTimer = setTimeout(() => {
314 pollTimer = null;
315 void runPoll();
316 }, input.pollMs ?? OAUTH_AWAIT_DEFAULT_POLL_MS);
317 };
318 const runPoll = async () => {
319 if (settled) return;
320 await poll();

Callers 1

runPollFunction · 0.85

Calls 1

runPollFunction · 0.85

Tested by

no test coverage detected