Fixed a problem where NPE is thrown when NioWorker.write() is called too early
This commit is contained in:
parent
85e63a2c98
commit
22f33539c1
@ -387,7 +387,10 @@ class NioWorker implements Runnable {
|
|||||||
worker.writeTaskQueue.offer(channel.writeTask);
|
worker.writeTaskQueue.offer(channel.writeTask);
|
||||||
}
|
}
|
||||||
if (worker.wakenUp.compareAndSet(false, true)) {
|
if (worker.wakenUp.compareAndSet(false, true)) {
|
||||||
worker.selector.wakeup();
|
Selector workerSelector = worker.selector;
|
||||||
|
if (workerSelector != null) {
|
||||||
|
workerSelector.wakeup();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user