summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/src/com/tightvnc/vncviewer/RecordOutputStream.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/java/src/com/tightvnc/vncviewer/RecordOutputStream.java b/java/src/com/tightvnc/vncviewer/RecordOutputStream.java
index 188695cc..a19384e5 100644
--- a/java/src/com/tightvnc/vncviewer/RecordOutputStream.java
+++ b/java/src/com/tightvnc/vncviewer/RecordOutputStream.java
@@ -10,15 +10,18 @@ public class RecordOutputStream implements DataOutput {
}
public void write(byte[] b) throws IOException {
- recordInterface.write(b);
+ if (recordInterface.canWrite())
+ recordInterface.write(b);
}
public void write(byte[] b, int off, int len) throws IOException {
- recordInterface.write(b, off, len);
+ if (recordInterface.canWrite())
+ recordInterface.write(b, off, len);
}
public void write(int b) throws IOException {
- recordInterface.writeIntBE(b);
+ if (recordInterface.canWrite())
+ recordInterface.writeIntBE(b);
}
public void writeBoolean(boolean v) { }