diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/DisconnectReason.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/DisconnectReason.java index ff5831e716..9d15ef2f04 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/DisconnectReason.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/DisconnectReason.java @@ -21,8 +21,8 @@ public enum DisconnectReason { REDIRECT_ON_CRITICAL_ERROR((byte)1, true), SCALE_DOWN((byte)2, false), SCALE_DOWN_ON_CRITICAL_ERROR((byte)3, true), - SHOUT_DOWN((byte)4, false), - SHOUT_DOWN_ON_CRITICAL_ERROR((byte)5, true); + SHUT_DOWN((byte)4, false), + SHUT_DOWN_ON_CRITICAL_ERROR((byte)5, true); private final byte type; private final boolean criticalError; @@ -49,7 +49,7 @@ public enum DisconnectReason { } public boolean isShutDown() { - return this == SHOUT_DOWN || this == SHOUT_DOWN_ON_CRITICAL_ERROR; + return this == SHUT_DOWN || this == SHUT_DOWN_ON_CRITICAL_ERROR; } public static DisconnectReason getType(byte type) { @@ -63,9 +63,9 @@ public enum DisconnectReason { case 3: return SCALE_DOWN_ON_CRITICAL_ERROR; case 4: - return SHOUT_DOWN; + return SHUT_DOWN; case 5: - return SHOUT_DOWN_ON_CRITICAL_ERROR; + return SHUT_DOWN_ON_CRITICAL_ERROR; default: return null; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java index 84ae30b196..aaa4a82606 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java @@ -473,7 +473,7 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager { if (type == PacketImpl.DISCONNECT) { final DisconnectMessage disMessage = (DisconnectMessage) packet; - handleDisconnect(disMessage.getNodeID(), null, null, null); + handleDisconnect(disMessage.getNodeID(), DisconnectReason.SHUT_DOWN, null, null); } else if (type == PacketImpl.DISCONNECT_V2) { final DisconnectMessage_V2 disMessage = (DisconnectMessage_V2) packet; handleDisconnect(disMessage.getNodeID(), DisconnectReason.SCALE_DOWN, disMessage.getScaleDownNodeID(), null); diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java index c62e0a2a77..5af391862c 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java @@ -254,7 +254,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement @Override public void disconnect(final boolean criticalError) { - disconnect(criticalError ? DisconnectReason.SHOUT_DOWN_ON_CRITICAL_ERROR : DisconnectReason.SHOUT_DOWN, null, null); + disconnect(criticalError ? DisconnectReason.SHUT_DOWN_ON_CRITICAL_ERROR : DisconnectReason.SHUT_DOWN, null, null); } @Override