Allow disable Recycler via -Dio.netty.recycler.maxCapacity=0
Motivation: It should be possible to disable the Recycler with -Dio.netty.recycler.maxCapacity=0, but because of a typo this is not the case. Modifications: Replace <= with < to make it posible to disable the Recycler. Result: Correct behaviour when using -Dio.netty.recycler.maxCapacity=0
This commit is contained in:
parent
b26652a934
commit
4e1760c91b
@ -55,7 +55,7 @@ public abstract class Recycler<T> {
|
||||
// e.g. io.netty.recycler.maxCapacity.writeTask
|
||||
// io.netty.recycler.maxCapacity.outboundBuffer
|
||||
int maxCapacity = SystemPropertyUtil.getInt("io.netty.recycler.maxCapacity", DEFAULT_INITIAL_MAX_CAPACITY);
|
||||
if (maxCapacity <= 0) {
|
||||
if (maxCapacity < 0) {
|
||||
// TODO: Some arbitrary large number - should adjust as we get more production experience.
|
||||
maxCapacity = 262144;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user