-
Notifications
You must be signed in to change notification settings - Fork 378
Open
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Milestone
Description
I'm writing an LSP extension that uses socket transport kind.
When the command in the server option exits with a nonnull code, the LanguageClient gets stuck in start().
const serverOptions = {
"command": "node",
"args": ["-e", "process.exit(42)"],
transport: {
kind: TransportKind.socket,
port: 8080
}
}
const clientOptions = {}
lspClient = new LanguageClient(
"MylanguageServer",
"My Language Server",
serverOptions,
clientOptions
);
lspClient.onDidChangeState((state) => {
const states = ["Stopped", "Running", "Starting"];
console.log(`State change from ${states[state.oldState-1]} to ${states[state.newState-1]}`)
})
lspClient.start();I expect that the start fails if the command fails.
I tried to investigate. The start() seems to be waiting for a connection before registering on the exit event of the spawned process.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug