This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a commit to branch delivery
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/delivery by this push:
     new d2b8034  Prevent endless restarts when changing JDKs.
d2b8034 is described below

commit d2b8034b2f26fd1c3d9838d9a341b1115b2cd4e3
Author: Svata Dedic <svatopluk.de...@oracle.com>
AuthorDate: Tue Nov 10 13:28:57 2020 +0100

    Prevent endless restarts when changing JDKs.
---
 java/java.lsp.server/vscode/src/extension.ts | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/java/java.lsp.server/vscode/src/extension.ts 
b/java/java.lsp.server/vscode/src/extension.ts
index 2981f72..1c85249 100644
--- a/java/java.lsp.server/vscode/src/extension.ts
+++ b/java/java.lsp.server/vscode/src/extension.ts
@@ -251,7 +251,9 @@ function doActivateWithJDK(specifiedJDK: string | null, 
context: ExtensionContex
     let ideRunning = new Promise((resolve, reject) => {
         let collectedText : string | null = '';
         function logAndWaitForEnabled(text: string) {
-            activationPending = false;
+            if (p == nbProcess) {
+                activationPending = false;
+            }
             log.append(text);
             if (collectedText == null) {
                 return;
@@ -357,7 +359,9 @@ function doActivateWithJDK(specifiedJDK: string | null, 
context: ExtensionContex
                 },
                 closed : function(): CloseAction {
                     log.appendLine("Connection to Apache NetBeans Language 
Server closed.");
-                    restartWithJDKLater(10000, false);
+                    if (!activationPending) {
+                        restartWithJDKLater(10000, false);
+                    }
                     return CloseAction.DoNotRestart;
                 }
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to