MCPcopy Index your code
hub / github.com/coder/code-server / disposeChild

Method disposeChild

src/node/wrapper.ts:272–282  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

270 }
271
272 private async disposeChild(): Promise<void> {
273 this.started = undefined
274 if (this.child) {
275 const child = this.child
276 child.removeAllListeners()
277 child.kill()
278 // Wait for the child to exit otherwise its output will be lost which can
279 // be especially problematic if you're trying to debug why cleanup failed.
280 await new Promise((r) => child!.on("exit", r))
281 }
282 }
283
284 private async relaunch(): Promise<void> {
285 this.disposeChild()

Callers 2

constructorMethod · 0.95
relaunchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected