Skip to content

aio-core 1.5.31 版本会提示这个错 #12

@zkname

Description

@zkname

不确定是哪里多线程同时操作了?

是不是需要selectionKey.isValid() 先判断一下?

java.nio.channels.CancelledKeyException
        at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
        at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:77)
        at org.smartboot.socket.enhance.EnhanceAsynchronousChannelGroup.removeOps(EnhanceAsynchronousChannelGroup.java:122)
        at org.smartboot.socket.enhance.EnhanceAsynchronousServerChannel.doRead(EnhanceAsynchronousServerChannel.java:273)
        at org.smartboot.socket.enhance.EnhanceAsynchronousChannelGroup.lambda$new$0(EnhanceAsynchronousChannelGroup.java:76)
        at org.smartboot.socket.enhance.EnhanceAsynchronousChannelGroup$Worker.run(EnhanceAsynchronousChannelGroup.java:219)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions