Skip to content

Commit

Permalink
Check the pipe name when transport kind is default (#3680)
Browse files Browse the repository at this point in the history
Signed-off-by: Sheng Chen <[email protected]>
  • Loading branch information
jdneo authored Jun 21, 2024
1 parent bc1efd6 commit e3186c4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/javaServerStarter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ export function prepareExecutable(requirements: RequirementsData, workspacePath,
const transportKind = getJavaConfiguration().get('transport');

switch (transportKind) {
case 'stdio':
executable.transport = TransportKind.stdio;
break;
case 'pipe':
default:
executable.transport = TransportKind.pipe;
try {
generateRandomPipeName();
Expand All @@ -62,12 +66,6 @@ export function prepareExecutable(requirements: RequirementsData, workspacePath,
executable.transport = TransportKind.stdio;
}
break;
case 'stdio':
executable.transport = TransportKind.stdio;
break;
default:
executable.transport = TransportKind.pipe;
break;
}
logger.info(`Starting Java server with: ${executable.command} ${executable.args?.join(' ')}`);
return executable;
Expand Down

0 comments on commit e3186c4

Please sign in to comment.