]> source.dussan.org Git - tigervnc.git/commitdiff
Fix exit routine in java viewer 215/head
authorBrian P. Hinz <bphinz@users.sf.net>
Sun, 11 Oct 2015 16:20:51 +0000 (12:20 -0400)
committerBrian P. Hinz <bphinz@users.sf.net>
Sun, 11 Oct 2015 16:20:51 +0000 (12:20 -0400)
Some exceptions were causing all viewers to exit, not just the
one that threw the exception.

java/com/tigervnc/vncviewer/VncViewer.java

index 0f7ce8eb366e578c4217b0827b564a0c354171fd..0c54d79685a7f27539fc46abb40e3b11f6bdf302 100644 (file)
@@ -464,19 +464,18 @@ public class VncViewer extends javax.swing.JApplet
       cc = new CConn(this, sock, vncServerName.getValue());
       while (!cc.shuttingDown)
         cc.processMsg();
+      exit(0);
     } catch (java.lang.Exception e) {
       if (cc == null || !cc.shuttingDown) {
         reportException(e);
         if (cc != null)
           cc.deleteWindow();
-        exit(1);
       } else if (embed.getValue()) {
         reportException(new java.lang.Exception("Connection closed"));
-      } else {
-        cc = null;
+        exit(0);
       }
+      exit(1);
     }
-    exit(0);
   }
 
   static BoolParameter noLionFS