commit | 7ff50badfd0379e2ceb61308ca89f3890e70b7b0 | [log] [tgz] |
---|---|---|
author | Alex Rudyy <orudyy@apache.org> | Sun Sep 09 23:11:18 2018 +0100 |
committer | Alex Rudyy <orudyy@apache.org> | Mon Sep 10 01:10:54 2018 +0100 |
tree | 837761ae75839e73d3522e23b0e9f74daed23c75 | |
parent | 367b0805cba347a362a143da4948704f6d263118 [diff] |
QPID-8233: [Broker-J] Send "connection-forced" error when virtual host is in the process of activating
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java index 03954b4..02465a2 100644 --- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java +++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java
@@ -912,7 +912,6 @@ if (!addressSpace.isActive()) { final Error err = new Error(); - err.setCondition(AmqpError.NOT_FOUND); populateConnectionRedirect(addressSpace, err); closeConnection(err); } @@ -1023,10 +1022,12 @@ if(redirectHost == null) { + err.setCondition(ConnectionError.CONNECTION_FORCED); err.setDescription("Virtual host '" + _localHostname + "' is not active"); } else { + err.setCondition(ConnectionError.REDIRECT); String networkHost; int port; if(redirectHost.matches("\\[[0-9a-f:]+\\](:[0-9]+)?"))