Calculate the 80% the right way. See #327
This commit is contained in:
parent
f87bd9fd81
commit
a61403de53
@ -254,7 +254,7 @@ abstract class AbstractNioWorker implements Worker {
|
||||
Selector selector = this.selector;
|
||||
|
||||
// use 80% of the timeout for measure
|
||||
final long minSelectTimeout = SelectorUtil.SELECT_TIMEOUT_NANOS / 100 * 80;
|
||||
final long minSelectTimeout = SelectorUtil.SELECT_TIMEOUT_NANOS * 80 / 100;
|
||||
boolean wakenupFromLoop = false;
|
||||
for (;;) {
|
||||
wakenUp.set(false);
|
||||
|
@ -245,7 +245,7 @@ class NioClientSocketPipelineSink extends AbstractNioChannelSink {
|
||||
long lastConnectTimeoutCheckTimeNanos = System.nanoTime();
|
||||
|
||||
// use 80% of the timeout for measure
|
||||
final long minSelectTimeout = SelectorUtil.SELECT_TIMEOUT_NANOS / 100 * 80;
|
||||
final long minSelectTimeout = SelectorUtil.SELECT_TIMEOUT_NANOS * 80 / 100;
|
||||
boolean wakenupFromLoop = false;
|
||||
for (;;) {
|
||||
wakenUp.set(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user