aboutsummaryrefslogtreecommitdiffstats
path: root/jrt/src/com/yahoo
diff options
context:
space:
mode:
Diffstat (limited to 'jrt/src/com/yahoo')
-rw-r--r--jrt/src/com/yahoo/jrt/Buffer.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/jrt/src/com/yahoo/jrt/Buffer.java b/jrt/src/com/yahoo/jrt/Buffer.java
index e57eda3473f..937666a28ae 100644
--- a/jrt/src/com/yahoo/jrt/Buffer.java
+++ b/jrt/src/com/yahoo/jrt/Buffer.java
@@ -32,6 +32,10 @@ class Buffer {
}
readPos = buf.position();
buf.limit(buf.capacity());
+ if (readPos == writePos) {
+ readPos = 0;
+ writePos = 0;
+ }
buf.position(writePos);
readMode = false;
}