MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / stopManagedServer

Function stopManagedServer

src/cm/lsp/serverLauncher.ts:1182–1197  ·  view source on GitHub ↗
(serverId: string)

Source from the content-addressed store, hash-verified

1180}
1181
1182export function stopManagedServer(serverId: string): void {
1183 const entry = managedServers.get(serverId);
1184 if (!entry) return;
1185 addLspLog(serverId, "info", "Stopping managed server");
1186 const executor = getExecutor();
1187 executor.stop(entry.uuid).catch((error: Error) => {
1188 console.warn(`Failed to stop language server ${serverId}`, error);
1189 });
1190 managedServers.delete(serverId);
1191 announcedServers.delete(serverId);
1192
1193 // Stop foreground service when all servers are stopped
1194 if (managedServers.size === 0) {
1195 executor.stopService().catch(() => {});
1196 }
1197}
1198
1199export function resetManagedServers(): void {
1200 for (const id of Array.from(managedServers.keys())) {

Callers 7

applyLspSettingsFunction · 0.90
EditorManagerFunction · 0.90
callbackFunction · 0.90
restartServerFunction · 0.85
stopServerFunction · 0.85
uninstallServerFunction · 0.85
resetManagedServersFunction · 0.85

Calls 6

addLspLogFunction · 0.90
stopServiceMethod · 0.80
getExecutorFunction · 0.70
stopMethod · 0.65
deleteMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected