summaryrefslogtreecommitdiffstats
path: root/src/main/java/de/bwlehrpool/bwlp_guac/VncConnection.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/bwlehrpool/bwlp_guac/VncConnection.java')
-rw-r--r--src/main/java/de/bwlehrpool/bwlp_guac/VncConnection.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/de/bwlehrpool/bwlp_guac/VncConnection.java b/src/main/java/de/bwlehrpool/bwlp_guac/VncConnection.java
index 06a7013..0afafd0 100644
--- a/src/main/java/de/bwlehrpool/bwlp_guac/VncConnection.java
+++ b/src/main/java/de/bwlehrpool/bwlp_guac/VncConnection.java
@@ -101,11 +101,15 @@ public class VncConnection implements Closeable {
return true;
}
- private void printError() throws IOException {
- int len = in.readInt();
- byte[] msg = new byte[len];
- in.readFully(msg);
- LOGGER.info(new String(msg, StandardCharsets.ISO_8859_1));
+ private void printError() {
+ try {
+ int len = in.readInt();
+ byte[] msg = new byte[len];
+ in.readFully(msg);
+ LOGGER.info(new String(msg, StandardCharsets.ISO_8859_1));
+ } catch (IOException e) {
+ // Nothing, we're already kinda handling an error, so if we can't fetch the message, ignore
+ }
}
@Override