Done some more testing. Looks like the problem may be that when port 9998 is closed, sometimes the SelectionKey for the 9999 channel becomes invalid.
I created a wrapper class for SelectionKey in DefaultListeningIOReactor to keep track of calls to cancel(); this seems to show that the key can become invalid *without* being cancelled... It's not clear how this happens. There is an "interesting" package private method AbstractSelectionKey#invalidate() which just sets valid=false. Could this be called internally? Getting late; might try running that under debug tomorrow. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]