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