Skip to content

Commit

Permalink
When it is the last drained element do not schedule the flush operation
Browse files Browse the repository at this point in the history
Related to #413
  • Loading branch information
violetagg committed Aug 23, 2018
1 parent e079cab commit 43d5261
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 43d5261

Please sign in to comment.