Skip to content
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ private void doWrite(ChannelHandlerContext ctx, Netty4ChunkedHttpResponse readyR
combiner.add((Future<Void>) first);
currentChunkedWrite = new ChunkedWrite(combiner, promise, readyResponse);
if (enqueueWrite(ctx, readyResponse, first)) {
// we were able to write out the first chunk directly, try writing out subsequent chunks until the channel becomes unwritable
// We were able to write out the first chunk directly, try writing out subsequent chunks until the channel becomes unwritable.
// NB "writable" means there's space in the downstream ChannelOutboundBuffer, we aren't trying to saturate the physical channel.
while (ctx.channel().isWritable()) {
if (writeChunk(ctx, combiner, readyResponse.body())) {
finishChunkedWrite();
Expand Down Expand Up @@ -280,6 +281,7 @@ private boolean doFlush(ChannelHandlerContext ctx) throws IOException {
return false;
}
while (channel.isWritable()) {
// NB "writable" means there's space in the downstream ChannelOutboundBuffer, we aren't trying to saturate the physical channel.
WriteOperation currentWrite = queuedWrites.poll();
if (currentWrite == null) {
doWriteQueued(ctx);
Expand Down