Skip to content

Internet card selector update logic erroneously drops non-ready keys #3634

@Fingercomp

Description

@Fingercomp

On this line, only keys present in the selected key set are registered in the new selector:

selectedKeys.filter(!readableKeys.contains(_)).foreach(key => {

However, a selection key is added to the selected key set only once its channel becomes ready for an I/O operation. Therefore, if a socket is not yet ready (I suspect, most of the time, this is true for any other open socket connection in the world), it won't be in that set and so won't be registered in the new selector.

Suggested change:

selector.keys.filter(!readableKeys.contains(_)).foreach(key => { 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugOC feature is broken

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions