Skip to content

Commit

Permalink
fix(StdioClient): Only log if child has been started
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Jan 8, 2020
1 parent 80bbc26 commit 3594973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stdio/StdioClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ export class StdioClient extends StreamClient {
* stop the child server process.
*/
public stop(): Promise<void> {
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()
Expand Down

0 comments on commit 3594973

Please sign in to comment.