Skip to content

Commit

Permalink
[ISSUE #6246] Optimize AcceptSocketService#run
Browse files Browse the repository at this point in the history
  • Loading branch information
hardyfish authored Mar 5, 2023
1 parent 44a1694 commit ce99a7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public void run() {

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) {
Expand Down

0 comments on commit ce99a7f

Please sign in to comment.