From e3186c4c969f22209695894f50face2716d61418 Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Fri, 21 Jun 2024 15:05:42 +0800 Subject: [PATCH] Check the pipe name when transport kind is default (#3680) Signed-off-by: Sheng Chen --- src/javaServerStarter.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/javaServerStarter.ts b/src/javaServerStarter.ts index 4fa228540..679097379 100644 --- a/src/javaServerStarter.ts +++ b/src/javaServerStarter.ts @@ -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(); @@ -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;