MCPcopy Create free account
hub / github.com/anomalyco/opencode / stopIfIdle

Function stopIfIdle

packages/opencode/src/mcp/oauth-callback.ts:35–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33}
34
35function stopIfIdle() {
36 if (pendingAuths.size > 0 || !server) return
37
38 server.close()
39 server = undefined
40}
41
42function handleRequest(req: import("http").IncomingMessage, res: import("http").ServerResponse) {
43 const url = new URL(req.url || "/", `http://localhost:${currentPort}`)

Callers 3

handleRequestFunction · 0.85
waitForCallbackFunction · 0.85
cancelPendingFunction · 0.85

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected