Small simplification to WriteTask optimization (#9807)
Motiviation #9800 was just merged which consolidates the flush/no-flush WriteTasks in AbstractChannelHandlerContext, but after looking at the changes again I noticed a tiny simplification that would be good to make imo. Modification Remove use of conditional operator in decrementPendingOutboundBytes() Result Simpler code, one less branch
This commit is contained in:
parent
2886bd6677
commit
6d0c0e991b
@ -1109,7 +1109,7 @@ abstract class AbstractChannelHandlerContext implements ChannelHandlerContext, R
|
||||
|
||||
private void decrementPendingOutboundBytes() {
|
||||
if (ESTIMATE_TASK_SIZE_ON_SUBMIT) {
|
||||
ctx.pipeline.decrementPendingOutboundBytes(size >= 0 ? size : (size & Integer.MAX_VALUE));
|
||||
ctx.pipeline.decrementPendingOutboundBytes(size & Integer.MAX_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user