Remove duplicated calculation (#9565)
Motivation: calculateMaxBytesPerGatheringWrite() contains duplicated calculation: getSendBufferSize() << 1 Modifications: Remove the duplicated calculation Result: The method will be clear and better
This commit is contained in:
parent
21720e4a78
commit
d01282e5f9
@ -517,7 +517,7 @@ public class NioSocketChannel extends AbstractNioByteChannel implements io.netty
|
||||
// Multiply by 2 to give some extra space in case the OS can process write data faster than we can provide.
|
||||
int newSendBufferSize = getSendBufferSize() << 1;
|
||||
if (newSendBufferSize > 0) {
|
||||
setMaxBytesPerGatheringWrite(getSendBufferSize() << 1);
|
||||
setMaxBytesPerGatheringWrite(newSendBufferSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user