460210 - ExecutionStragegy producer for SelectManager calls onOpen from produce method
fixed NPE on connection destroy for stopped selector
This commit is contained in:
parent
e83549f4b4
commit
c4a49110ef
|
@ -120,7 +120,8 @@ public class ManagedSelector extends AbstractLifeCycle implements Runnable, Dump
|
|||
_actions.offer(change);
|
||||
if (_selecting)
|
||||
{
|
||||
_selector.wakeup();
|
||||
if (_selector!=null)
|
||||
_selector.wakeup();
|
||||
// To avoid the extra select wakeup.
|
||||
_selecting=false;
|
||||
}
|
||||
|
@ -708,8 +709,12 @@ public class ManagedSelector extends AbstractLifeCycle implements Runnable, Dump
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
Selector selector=_selector;
|
||||
_selector=null;
|
||||
Selector selector;
|
||||
try(SpinLock.Lock lock = _lock.lock())
|
||||
{
|
||||
selector=_selector;
|
||||
_selector=null;
|
||||
}
|
||||
closeNoExceptions(selector);
|
||||
_latch.countDown();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue