MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / gracefulStop

Method gracefulStop

src/runtime/lifecycle.ts:92–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90 }
91
92 private async gracefulStop(): Promise<void> {
93 for (const adapter of [...this.adapters].reverse()) {
94 try {
95 await adapter.stop();
96 } catch (err) {
97 console.error(`[Lifecycle] Failed to stop ${adapter.name}:`, err);
98 }
99 }
100
101 if (!this.server.listening) {
102 return;
103 }
104
105 await new Promise<void>((resolve) => {
106 this.server.close(() => resolve());
107 });
108 }
109}

Callers 1

gracefulStopAndExitMethod · 0.95

Calls 1

stopMethod · 0.65

Tested by

no test coverage detected