Hi, I'm using lsp4j:0.24.0 java client with clangd server. Client works, but something related to lsp4j client still holding the process for exactly one minute after shutdown completed, clangd process quit and java main() is finished. What I'm doing wrong related to cleanup order of lsp4j client?
openjdk 17, Ubuntu 24.04 x86_64.
// In constructor:
final ProcessBuilder clangdProcessBuilder = new ProcessBuilder(
clangdPath, ... , "--log=verbose"
);
final Process clangdProcess = clangdProcessBuilder.start();
this.inputStream = clangdProcess.getInputStream();
this.outputStream = clangdProcess.getOutputStream();
Launcher<LanguageServer> launcher = LSPLauncher.createClientLauncher(this, this.inputStream, this.outputStream);
launcherFuture = launcher.startListening();
this.server = launcher.getRemoteProxy();
....
// In close():
this.server.shutdown().thenRun(() -> {
this.server.exit();
this.launcherFuture.cancel(true);
}).join();
this.inputStream.close();
this.outputStream.close();
System.err.println("Clangd server shutdown completed");
Hi, I'm using
lsp4j:0.24.0java client withclangdserver. Client works, but something related to lsp4j client still holding the process for exactly one minute after shutdown completed,clangdprocess quit and javamain()is finished. What I'm doing wrong related to cleanup order of lsp4j client?openjdk 17, Ubuntu 24.04 x86_64.