Skip to content

Commit

Permalink
fix: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiaaming committed Aug 2, 2024
1 parent 50128b8 commit 175c8b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
5 changes: 1 addition & 4 deletions extension/src/bs/BspProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ export class BspProxy {
importerConnection: rpc.MessageConnection | null,
buildServerConnection: rpc.MessageConnection | null
): void {
if (!importerConnection) {
return;
}
if (!buildServerConnection) {
if (!importerConnection || !buildServerConnection) {
return;
}
importerConnection.onRequest((method, params) => {
Expand Down
13 changes: 9 additions & 4 deletions extension/src/server/GradleServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@ export class GradleServer {
return this.languageServerPipePath;
}
public async start(): Promise<void> {
const isPrepared = this.bspProxy.prepareToStart();
if (!isPrepared) {
this.logger.error("Failed to generate build server pipe path, build server will not start");
let startBuildServer = false;
if (redHatJavaInstalled()) {
const isPrepared = this.bspProxy.prepareToStart();
if (isPrepared) {
startBuildServer = true;
} else {
this.logger.error("Failed to generate build server pipe path, build server will not start");
}
}
const startBuildServer = isPrepared && redHatJavaInstalled();

this.bspProxy.setBuildServerStarted(startBuildServer);

this.taskServerPort = await getPort();
Expand Down

0 comments on commit 175c8b9

Please sign in to comment.