diff options
author | Brian P. Hinz <bphinz@users.sf.net> | 2015-10-11 12:20:51 -0400 |
---|---|---|
committer | Brian P. Hinz <bphinz@users.sf.net> | 2015-10-11 12:20:51 -0400 |
commit | 536a00e35c8c5ddbd00adeab850a3d5a3b8be41d (patch) | |
tree | efc8d22faa30952b712ede39e9f415f37397efe5 /java | |
parent | fdb669952da1ca60a88291632de7834b8f7ed8dc (diff) | |
download | tigervnc-536a00e35c8c5ddbd00adeab850a3d5a3b8be41d.tar.gz tigervnc-536a00e35c8c5ddbd00adeab850a3d5a3b8be41d.zip |
Fix exit routine in java viewer
Some exceptions were causing all viewers to exit, not just the
one that threw the exception.
Diffstat (limited to 'java')
-rw-r--r-- | java/com/tigervnc/vncviewer/VncViewer.java | 7 |
1 files changed, 3 insertions, 4 deletions
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 |