incubator-awf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmee...@apache.org
Subject svn commit: r1165691 - /incubator/deft/sandbox/src/main/java/org/apache/deft/io/IOLoop.java
Date Tue, 06 Sep 2011 14:54:11 GMT
Author: jmeehan
Date: Tue Sep  6 14:54:11 2011
New Revision: 1165691

URL: http://svn.apache.org/viewvc?rev=1165691&view=rev
Log:
DEFT-149 - Catch CancelledKeyException, log and continue.

Modified:
    incubator/deft/sandbox/src/main/java/org/apache/deft/io/IOLoop.java

Modified: incubator/deft/sandbox/src/main/java/org/apache/deft/io/IOLoop.java
URL: http://svn.apache.org/viewvc/incubator/deft/sandbox/src/main/java/org/apache/deft/io/IOLoop.java?rev=1165691&r1=1165690&r2=1165691&view=diff
==============================================================================
--- incubator/deft/sandbox/src/main/java/org/apache/deft/io/IOLoop.java (original)
+++ incubator/deft/sandbox/src/main/java/org/apache/deft/io/IOLoop.java Tue Sep  6 14:54:11
2011
@@ -22,6 +22,7 @@ package org.apache.deft.io;
 import static com.google.common.collect.Collections2.transform;
 
 import java.io.IOException;
+import java.nio.channels.CancelledKeyException;
 import java.nio.channels.ClosedChannelException;
 import java.nio.channels.SelectableChannel;
 import java.nio.channels.SelectionKey;
@@ -121,9 +122,10 @@ public class IOLoop implements IOLoopMXB
                 if (cm.execute()) {
                     selectorTimeout = 1;
                 }
-
             } catch (IOException e) {
-                logger.error("Exception received in IOLoop: {}", e);
+                logger.error("IOException received in IOLoop: {}", e);
+            } catch (CancelledKeyException e) {
+                logger.error("CancelledKeyException received in IOLoop: {}", e);
             }
         }
     }
@@ -232,5 +234,4 @@ public class IOLoop implements IOLoopMXB
         });
         return Lists.newLinkedList(readables);
     }
-
 }



Mime
View raw message