Fix race-condition which could lead to a NPE or Exception while register a Channel with a Worker. See #469
This commit is contained in:
parent
c059d13108
commit
54ad935ec5
@ -143,6 +143,7 @@ abstract class AbstractNioWorker implements Worker {
|
||||
assert offered;
|
||||
|
||||
if (wakenUp.compareAndSet(false, true)) {
|
||||
synchronized (startStopLock) {
|
||||
// wake up the selector to speed things
|
||||
selector = this.selector;
|
||||
|
||||
@ -152,6 +153,8 @@ abstract class AbstractNioWorker implements Worker {
|
||||
selector.wakeup();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user