Ill try to put some client code together that can make it easier to reproduce the behavior.
If what you’r saying is correct, then isnt it impossibel to do a workaround to this problem? In theory the addNewConnections method could be called while the selector thread was out in the select loop, and had last returned a 0-set. If the new connection had then been closed before being processed it wouldnt be registered. Without the register() call (which seems to reset internal state) the selector would be in the same situation as in my test code. It of course takes a good portion of bad luck to have the thread scheduler “pause” the selector thread out in the select loop, but thats not something you can guard your code against.