This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/main by this push:
     new 90f96a0299 [AMQ-9283] Fix memory leak with STOMP unsubscribe
     new 52d70325ca This closes #1031
90f96a0299 is described below

commit 90f96a02992b64ba330c6e6b62e6a8fc3d4d8120
Author: u8675309 <[email protected]>
AuthorDate: Mon Jun 12 12:10:54 2023 -0600

    [AMQ-9283] Fix memory leak with STOMP unsubscribe
---
 .../main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
 
b/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
index 1f6f9069d5..9981452e63 100644
--- 
a/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
+++ 
b/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
@@ -718,6 +718,7 @@ public class ProtocolConverter {
         if (subscriptionId != null) {
             StompSubscription sub = this.subscriptions.remove(subscriptionId);
             if (sub != null) {
+                
subscriptionsByConsumerId.remove(sub.getConsumerInfo().getConsumerId());
                 sendToActiveMQ(sub.getConsumerInfo().createRemoveCommand(), 
createResponseHandler(command));
                 return;
             }

Reply via email to