Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixed NIO Bug #68

Merged
merged 1 commit into from Mar 8, 2012
Jump to file or symbol
Failed to load files and symbols.
+2 −1
Split
@@ -188,7 +188,8 @@ public void run() {
SelectionKey selectionKey = i.next();
i.remove();
- if(selectionKey.isReadable() || selectionKey.isWritable()) {
+ if(selectionKey.isValid()
+ && (selectionKey.isReadable() || selectionKey.isWritable())) {
Runnable worker = (Runnable) selectionKey.attachment();
worker.run();
}