diff options
author | jfrijters <jfrijters> | 2012-03-18 14:54:16 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2012-03-18 14:54:16 +0400 |
commit | e5684b13103051c2c43a594fc3c96ddde7f52bc0 (patch) | |
tree | 9124d903d97ee055dffe8ee326824337ebab5a22 /openjdk/sun/nio/ch/IOUtil.java | |
parent | 68dd4620373780518ead81f25eef9f38b03c1f86 (diff) |
Bug fix. When writing a direct ByteBuffer to a non-blocking socket and the write fails because there is no kernel buffer available, we should not advance the ByteBuffer position.
Diffstat (limited to 'openjdk/sun/nio/ch/IOUtil.java')
-rw-r--r-- | openjdk/sun/nio/ch/IOUtil.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openjdk/sun/nio/ch/IOUtil.java b/openjdk/sun/nio/ch/IOUtil.java index 45b9b704..06ed345b 100644 --- a/openjdk/sun/nio/ch/IOUtil.java +++ b/openjdk/sun/nio/ch/IOUtil.java @@ -155,6 +155,7 @@ class IOUtil { int pos = src.position(); byte[] buf = new byte[src.remaining()]; src.get(buf); + src.position(pos); int len = nd.write(fd, buf, 0, buf.length); if (len > 0) { |