MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / stopAll

Method stopAll

src/mcp/manager.ts:158–167  ·  view source on GitHub ↗

Stop all servers (called on graceful shutdown). Also clears their tools from the registry.

()

Source from the content-addressed store, hash-verified

156
157 /** Stop all servers (called on graceful shutdown). Also clears their tools from the registry. */
158 async stopAll(): Promise<void> {
159 const stops = Array.from(this.clients.values()).map(c => c.stop().catch(() => {}));
160 await Promise.allSettled(stops);
161 // Clean up registry entries from all servers
162 for (const [, names] of this.registeredToolsByServer) {
163 for (const n of names) this.registry.unregister(n);
164 }
165 this.registeredToolsByServer.clear();
166 this.clients.clear();
167 }
168
169 status(): MCPClientStatus[] {
170 return Array.from(this.clients.values()).map(c => c.status);

Callers 2

shutdownFunction · 0.80
index.tsFile · 0.80

Calls 3

unregisterMethod · 0.80
stopMethod · 0.65
clearMethod · 0.45

Tested by

no test coverage detected