Skip to content

Commit

Permalink
fix - closeConnection() will fail if server haven't start (#1579)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiaaming authored Aug 12, 2024
1 parent fd29348 commit 070feb3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions extension/src/bs/BspProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,12 @@ export class BspProxy {
}

public closeConnection(): void {
this.buildServerConnector.close();
this.jdtlsImporterConnector.close();
try {
this.buildServerConnector.close();
this.jdtlsImporterConnector.close();
} catch (error) {
// Error when pipe server not started. Ignore it.
}
this.logger.info("Build Server connection closed");
}
}

0 comments on commit 070feb3

Please sign in to comment.