MCPcopy Create free account
hub / github.com/MigoXLab/coderio / stop

Method stop

src/tools/launch-tool/utils/dev-server-manager.ts:212–226  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

210 }
211
212 async stop(): Promise<void> {
213 if (!this.handle) return;
214 const child = this.handle.child;
215 this.handle = null;
216
217 await new Promise<void>(resolve => {
218 try {
219 child.once('close', () => resolve());
220 terminateChildProcess(child);
221 } catch {
222 resolve();
223 }
224 setTimeout(() => resolve(), 1500);
225 });
226 }
227
228 async restart(options: { timeoutMs: number } = { timeoutMs: 60_000 }): Promise<DevServerHandle> {
229 await this.stop();

Callers 2

restartMethod · 0.95
stopDevServerMethod · 0.80

Calls 1

terminateChildProcessFunction · 0.85

Tested by

no test coverage detected