diff --git a/src/stdio/StdioClient.ts b/src/stdio/StdioClient.ts index 8954a21f..017aa222 100644 --- a/src/stdio/StdioClient.ts +++ b/src/stdio/StdioClient.ts @@ -115,9 +115,9 @@ export class StdioClient extends StreamClient { * stop the child server process. */ public stop(): Promise { - log.debug(`Stopping client: ${this.address.url()}`) - if (this.child !== undefined) { + log.debug(`Stopping client: ${this.address.url()}`) + // Avoid unnecessary log errors by removing listener this.child.removeAllListeners('exit') this.child.kill()