Skip to content

Commit

Permalink
fix #413 When it is the last drained element do not schedule the flus…
Browse files Browse the repository at this point in the history
…h operation
  • Loading branch information
violetagg committed Aug 22, 2018
1 parent e079cab commit 9242735
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ ChannelFuture doWrite(Object msg, ChannelPromise promise, PublisherSender inner)
pendingBytes = 0L;

ChannelFuture future = ctx.write(msg, promise);
if (flushOnEachWithEventLoop && ctx.channel().isWritable()) {
if (flushOnEachWithEventLoop &&
!(inner == null && pendingWrites.isEmpty()) &&
ctx.channel().isWritable()) {
scheduleFlush();
}
else {
Expand Down

0 comments on commit 9242735

Please sign in to comment.