Skip to content

Commit

Permalink
Fix in Intellij startup procedure (due to a bug, in practice the time…
Browse files Browse the repository at this point in the history
…out for startup was only 1 second, which wasn't enough on some machines). Fixes #489
  • Loading branch information
fabioz committed Nov 4, 2021
1 parent e2ea48e commit 2ed8eac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion robocorp-python-ls-core/src/robocorp_ls_core/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ def watch_parent_process():
if not is_process_alive(pid):
# Note: just exit since the parent process already
# exited.
log.info("Force-quit process: %s", os.getpid())
log.info(
f"Force-quit process: %s because parent: %s exited",
os.getpid(),
pid,
)
os._exit(0)

time.sleep(PARENT_PROCESS_WATCH_INTERVAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public void start(Set<EditorLanguageServerConnection> editorConnections) {
break;
} catch (InterruptedException | ExecutionException | TimeoutException e) {
languageServerStreams.verifyProcess();
if (!this.isConnected() || i == timeoutInSeconds - 1) {
if (i == timeoutInSeconds - 1) {
LOG.info("Initialize was not received from the language server in the expected timeout.");
throw e;
}
Expand Down

0 comments on commit 2ed8eac

Please sign in to comment.