Skip to content

CancelledKeyException when WiFi is disconnected #127

@Steelight

Description

@Steelight

I had to make the following change to onWriteDemand():

@Override
public final void onWriteDemand( WebSocket conn ) {
    try/*IO*/{
        channel.keyFor( selector ).interestOps( SelectionKey.OP_READ | SelectionKey.OP_WRITE );
    } catch ( CancelledKeyException e ) {
    } 
    selector.wakeup();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions