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 0f7ce8e..0c54d79 100644
--- a/java/com/tigervnc/vncviewer/VncViewer.java
+++ b/java/com/tigervnc/vncviewer/VncViewer.java
@@ -464,19 +464,18 @@
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