Fix process reaper to be a little more robust
- cleanup rogue servers by server id. - server id is the same now for language of same type even if created from a different instance of ProcessStreamProvider Signed-off-by: Kris De Volder <kdevolder@pivotal.io>
This commit is contained in:
@@ -42,10 +42,10 @@ public abstract class STS4LanguageServerProcessStreamConnector extends ProcessSt
|
||||
private static LanguageServerProcessReaper processReaper = new LanguageServerProcessReaper();
|
||||
|
||||
private Supplier<Console> consoles = null;
|
||||
private final String connectorId;
|
||||
private String connectorId;
|
||||
|
||||
public STS4LanguageServerProcessStreamConnector(ServerInfo server) {
|
||||
this.connectorId = UUID.randomUUID().toString();
|
||||
this.connectorId = server.bundleId;
|
||||
this.consoles = LanguageServerConsoles.getConsoleFactory(server);
|
||||
}
|
||||
|
||||
@@ -59,9 +59,7 @@ public abstract class STS4LanguageServerProcessStreamConnector extends ProcessSt
|
||||
if (console!=null) {
|
||||
forwardTo(getLanguageServerLog(), console.out);
|
||||
} else {
|
||||
|
||||
new Thread("Consume LS error stream") {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
@@ -70,7 +68,6 @@ public abstract class STS4LanguageServerProcessStreamConnector extends ProcessSt
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
}.start();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*******************************************************************************/
|
||||
package org.springframework.ide.vscode.boot.jdt.ls;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -31,7 +30,6 @@ import com.google.common.base.Suppliers;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import reactor.core.Disposable;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
public class JavaProjectsServiceWithFallback implements JavaProjectsService {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user