jdk/src/share/classes/sun/tools/jconsole/VMPanel.java
changeset 18253 4323a5fe8bc4
parent 18197 ae73e4f50e08
parent 17719 ba3677303a76
child 19432 ce3b6c1ab8a6
--- a/jdk/src/share/classes/sun/tools/jconsole/VMPanel.java	Fri May 31 10:34:25 2013 +0100
+++ b/jdk/src/share/classes/sun/tools/jconsole/VMPanel.java	Mon Jun 10 10:38:33 2013 +0100
@@ -55,6 +55,7 @@
     private VMInternalFrame vmIF = null;
     private static ArrayList<TabInfo> tabInfos = new ArrayList<TabInfo>();
     private boolean wasConnected = false;
+    private boolean userDisconnected = false;
     private boolean shouldUseSSL = true;
 
     // The everConnected flag keeps track of whether the window can be
@@ -126,6 +127,7 @@
                 if (connectedIconBounds != null && (e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && connectedIconBounds.contains(e.getPoint())) {
 
                     if (isConnected()) {
+                        userDisconnected = true;
                         disconnect();
                         wasConnected = false;
                     } else {
@@ -453,6 +455,11 @@
     private void vmPanelDied() {
         disconnect();
 
+        if (userDisconnected) {
+            userDisconnected = false;
+            return;
+        }
+
         JOptionPane optionPane;
         String msgTitle, msgExplanation, buttonStr;