Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix a bug ChannelBufferInput#next blocks until the buffer is filled
  • Loading branch information
komamitsu committed Jul 4, 2017
commit 60ddba3cf6ec2f14bf2555f2f122892c644ad38c
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ public MessageBuffer next()
throws IOException
{
ByteBuffer b = buffer.sliceAsByteBuffer();
while (b.remaining() > 0) {
int ret = channel.read(b);
if (ret == -1) {
break;
}
int ret = channel.read(b);
if (ret == -1) {
return null;
}
b.flip();
return b.remaining() == 0 ? null : buffer.slice(0, b.limit());
Expand Down