From: Brian P. Hinz Date: Sun, 11 Oct 2015 16:20:51 +0000 (-0400) Subject: Fix exit routine in java viewer X-Git-Tag: v1.5.90~14^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F215%2Fhead;p=tigervnc.git Fix exit routine in java viewer Some exceptions were causing all viewers to exit, not just the one that threw the exception. --- diff --git a/java/com/tigervnc/vncviewer/VncViewer.java b/java/com/tigervnc/vncviewer/VncViewer.java index 0f7ce8eb..0c54d796 100644 --- a/java/com/tigervnc/vncviewer/VncViewer.java +++ b/java/com/tigervnc/vncviewer/VncViewer.java @@ -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