Skip to content

Commit ce99a7f

Browse files
authored
[ISSUE #6246] Optimize AcceptSocketService#run
1 parent 44a1694 commit ce99a7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public void run() {
342342

343343
if (selected != null) {
344344
for (SelectionKey k : selected) {
345-
if ((k.readyOps() & SelectionKey.OP_ACCEPT) != 0) {
345+
if (k.isAcceptable()) {
346346
SocketChannel sc = ((ServerSocketChannel) k.channel()).accept();
347347

348348
if (sc != null) {

0 commit comments

Comments
 (0)