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

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


The following commit(s) were added to refs/heads/activemq-5.17.x by this push:
     new 587980fa9b [AMQ-9283] Fix memory leak with STOMP unsubscribe
587980fa9b is described below

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

    [AMQ-9283] Fix memory leak with STOMP unsubscribe
    
    (cherry picked from commit 90f96a02992b64ba330c6e6b62e6a8fc3d4d8120)
---
 .../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