Skip to content

Commit

Permalink
Merge pull request #15 from fl4via/0.1
Browse files Browse the repository at this point in the history
#14 At AbstractXnioSocketChannel.doWrite, skip loop if there is a…
  • Loading branch information
jmesnil authored Sep 10, 2019
2 parents e01508f + 38bd31c commit fdd89f7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ protected void doWrite(ChannelOutboundBuffer in) throws Exception {
// Release the fully written buffers and update the indexes of the partially written buffer.

for (int i = msgCount; i > 0; i --) {
if (in.current() != null && ! (in.current() instanceof ByteBuf)) {
break;
}
final ByteBuf buf = (ByteBuf) in.current();
final int readerIndex = buf.readerIndex();
final int readableBytes = buf.writerIndex() - readerIndex;
Expand All @@ -214,12 +217,9 @@ protected void doWrite(ChannelOutboundBuffer in) throws Exception {
}

incompleteWrite(setOpWrite);
break;
}
continue;
}
}

Object msg = in.current();
if (msg == null) {
// Wrote all messages.
Expand Down

0 comments on commit fdd89f7

Please sign in to comment.