diff --git a/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java b/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java index c4ae81b349..6a1ca36323 100755 --- a/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java +++ b/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java @@ -98,7 +98,9 @@ public class ConnectionStateTracker extends CommandVisitorAdapter { public void onResponse(Command response) { ConnectionId connectionId = info.getConnectionId(); ConnectionState cs = connectionStates.get(connectionId); - cs.removeTransactionState(info.getTransactionId()); + if (cs != null) { + cs.removeTransactionState(info.getTransactionId()); + } } }