qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject qpid-broker-j git commit: QPID-8040: [Broker-J] Handle CancelledKeyException on processing of selection keys
Date Wed, 06 Dec 2017 14:33:54 GMT
Repository: qpid-broker-j
Updated Branches:
  refs/heads/master cd534214a -> 1c06450ac


QPID-8040: [Broker-J] Handle CancelledKeyException on processing of selection keys


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/1c06450a
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/1c06450a
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/1c06450a

Branch: refs/heads/master
Commit: 1c06450ac1cef869f7e87a168e2de4090773f436
Parents: cd53421
Author: Alex Rudyy <orudyy@apache.org>
Authored: Wed Dec 6 14:23:30 2017 +0000
Committer: Alex Rudyy <orudyy@apache.org>
Committed: Wed Dec 6 14:23:30 2017 +0000

----------------------------------------------------------------------
 .../apache/qpid/server/transport/SelectorThread.java    | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c06450a/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
b/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
index 92f6bbc..28dbfc5 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
@@ -192,6 +192,11 @@ class SelectorThread extends Thread
                         LOGGER.error("Failed to register selector on accepting port {} ",
                                      localSocketAddress, e);
                     }
+                    catch (CancelledKeyException e)
+                    {
+                        LOGGER.info("Failed to register selector on accepting port {}"
+                                    + " because selector key is already cancelled", localSocketAddress,
e);
+                    }
 
                     _workQueue.add(new Runnable()
                     {
@@ -222,6 +227,11 @@ class SelectorThread extends Thread
                                     LOGGER.error("Failed to register selector on accepting
port {}",
                                                  localSocketAddress, e);
                                 }
+                                catch (CancelledKeyException e)
+                                {
+                                    LOGGER.info("Failed to register selector on accepting
port {}"
+                                                + " because selector key is already cancelled",
localSocketAddress, e);
+                                }
                                 finally
                                 {
                                     _scheduler.decrementRunningCount();
@@ -239,7 +249,7 @@ class SelectorThread extends Thread
                         {
                             key.channel().register(_selector, 0, connection);
                         }
-                        catch (ClosedChannelException e)
+                        catch (ClosedChannelException | CancelledKeyException e)
                         {
                             // Ignore - we will schedule the connection anyway
                         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message