[ISSUE #6246] Optimize AcceptSocketService#run

This commit is contained in:
hardyfish
2023-03-05 11:21:44 +08:00
committed by GitHub
parent 44a1694d1a
commit ce99a7fe8a
@@ -342,7 +342,7 @@ public class DefaultHAService implements HAService {
if (selected != null) {
for (SelectionKey k : selected) {
if ((k.readyOps() & SelectionKey.OP_ACCEPT) != 0) {
if (k.isAcceptable()) {
SocketChannel sc = ((ServerSocketChannel) k.channel()).accept();
if (sc != null) {