MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / gracefulShutdown

Method gracefulShutdown

server/src/http.ts:8678–8682  ·  view source on GitHub ↗
(signal: string)

Source from the content-addressed store, hash-verified

8676 */
8677 private setupShutdownHandlers(): void {
8678 const gracefulShutdown = async (signal: string) => {
8679 logger.info({ signal }, 'Received shutdown signal, starting graceful shutdown');
8680 await this.stop();
8681 process.exit(0);
8682 };
8683
8684 process.on("SIGTERM", () => gracefulShutdown("SIGTERM"));
8685 process.on("SIGINT", () => gracefulShutdown("SIGINT"));

Callers

nothing calls this directly

Calls 1

stopMethod · 0.95

Tested by

no test coverage detected