diff options
| author | Robert Gemmell <robbie@apache.org> | 2014-05-22 15:00:08 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2014-05-22 15:00:08 +0000 |
| commit | 0778dc8875fa039dba274db7ff546e394ade0d52 (patch) | |
| tree | b4220bd72300e92f9d9572019362b72b3b677be2 /qpid/java/broker-plugins | |
| parent | 18954116815b65c948fa7cf4720b4c170efa0c14 (diff) | |
| download | qpid-python-0778dc8875fa039dba274db7ff546e394ade0d52.tar.gz | |
QPID-5771: ensure the closed event is passed to the listener even if closing the endpoint input throws something, ensure the connection is unregistered from the connection registry
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1596894 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins')
| -rw-r--r-- | qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngine_1_0_0_SASL.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngine_1_0_0_SASL.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngine_1_0_0_SASL.java index ef85e019e6..0d6861d80c 100644 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngine_1_0_0_SASL.java +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngine_1_0_0_SASL.java @@ -34,7 +34,6 @@ import javax.security.sasl.SaslException; import javax.security.sasl.SaslServer; import org.apache.log4j.Logger; - import org.apache.qpid.amqp_1_0.codec.FrameWriter; import org.apache.qpid.amqp_1_0.codec.ProtocolHandler; import org.apache.qpid.amqp_1_0.framing.AMQFrame; @@ -433,10 +432,16 @@ public class ProtocolEngine_1_0_0_SASL implements ServerProtocolEngine, FrameOut try { // todo - _endpoint.inputClosed(); - if (_endpoint != null && _endpoint.getConnectionEventListener() != null) + try { - ((Connection_1_0) _endpoint.getConnectionEventListener()).closed(); + _endpoint.inputClosed(); + } + finally + { + if (_endpoint != null && _endpoint.getConnectionEventListener() != null) + { + ((Connection_1_0) _endpoint.getConnectionEventListener()).closed(); + } } } catch(RuntimeException e) |
