Skip to content
Browse files

Merge pull request #68 from ctasada/40ef19a72e706b45468b26c53cd927a4f…

…e42d100

Fixed NIO Bug
  • Loading branch information...
2 parents 311788b + 40ef19a commit 667da20ab607dd8ad146e3ec4b9a46d408eff98e @vinothchandar vinothchandar committed Mar 8, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/java/voldemort/utils/SelectorManager.java
View
3 src/java/voldemort/utils/SelectorManager.java
@@ -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();
}

0 comments on commit 667da20

Please sign in to comment.
Something went wrong with that request. Please try again.