Correctly set wakeup.compareAndSet(..) before wakeup the Selector. See #578
This commit is contained in:
parent
e18959f836
commit
883af62c92
@ -398,12 +398,15 @@ abstract class AbstractNioWorker implements Worker {
|
|||||||
|
|
||||||
assert added;
|
assert added;
|
||||||
if (added) {
|
if (added) {
|
||||||
|
if (wakenUp.compareAndSet(false, true)) {
|
||||||
// wake up the selector to speed things
|
// wake up the selector to speed things
|
||||||
Selector selector = this.selector;
|
Selector selector = this.selector;
|
||||||
if (selector != null) {
|
if (selector != null) {
|
||||||
selector.wakeup();
|
selector.wakeup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user