MCPcopy
hub / github.com/codeaashu/claude-code / shutdownAndExit

Function shutdownAndExit

src/utils/claudeInChrome/mcpServer.ts:259–268  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

257 // Flush analytics before exiting so final-batch events (e.g. disconnect) aren't lost.
258 let exiting = false
259 const shutdownAndExit = async (): Promise<void> => {
260 if (exiting) {
261 return
262 }
263 exiting = true
264 await shutdown1PEventLogging()
265 await shutdownDatadog()
266 // eslint-disable-next-line custom-rules/no-process-exit
267 process.exit(0)
268 }
269 process.stdin.on('end', () => void shutdownAndExit())
270 process.stdin.on('error', () => void shutdownAndExit())
271

Callers 1

Calls 2

shutdown1PEventLoggingFunction · 0.85
shutdownDatadogFunction · 0.85

Tested by

no test coverage detected