Author: kwall
Date: Wed Feb 24 11:52:33 2016
New Revision: 1732086
URL: http://svn.apache.org/viewvc?rev=1732086&view=rev
Log:
QPID-7101: [Java Broker] Guard CancelledKeyException to deal with the case
where the Port is shutdown before the the connection has finally closed [IBMJDK]
Modified:
qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
Modified:
qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
URL:
http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java?rev=1732086&r1=1732085&r2=1732086&view=diff
==============================================================================
---
qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
(original)
+++
qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
Wed Feb 24 11:52:33 2016
@@ -596,8 +596,12 @@ class SelectorThread extends Thread
"Connection is probably being closed by peer.",
connection, e);
}
- catch (ClosedSelectorException e)
+ catch (ClosedSelectorException | CancelledKeyException e)
{
+ // TODO Port should really not proceed with closing the selector
until all of the
+ // Connection objects are closed. Connection objects should not be
closed until they
+ // have closed the underlying socket and removed themselves from
the selector. Once
+ // this is done, this catch/swallow can be removed.
LOGGER.debug("Failed to unregister with selector for connection
{}. " +
"Port has probably already been closed.", connection,
e);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]