You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2020/09/12 21:30:46 UTC

[qpid-broker-j] 13/17: QPID-8451:[Broker-J] Block session before adding it into blocked sesssion set

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

orudyy pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit 26f2ef6bf6b3f2fa8f906ecb165671cc633ca1d0
Author: Alex Rudyy <or...@apache.org>
AuthorDate: Thu Sep 10 00:00:27 2020 +0100

    QPID-8451:[Broker-J] Block session before adding it into blocked sesssion set
    
    This should eliminate the possibility of leaving session in blocked state
    when a consumer thread unblock the blocked sessions and remove them from the blocked session set
    
    (cherry picked from commit 3a74fc4976c3e49c4841c8dce76924b59033e294)
---
 .../qpid/server/queue/ProducerFlowControlOverflowPolicyHandler.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/broker-core/src/main/java/org/apache/qpid/server/queue/ProducerFlowControlOverflowPolicyHandler.java b/broker-core/src/main/java/org/apache/qpid/server/queue/ProducerFlowControlOverflowPolicyHandler.java
index b2559b5..51491e1 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/queue/ProducerFlowControlOverflowPolicyHandler.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/queue/ProducerFlowControlOverflowPolicyHandler.java
@@ -189,8 +189,8 @@ public class ProducerFlowControlOverflowPolicyHandler implements OverflowPolicyH
                         }
 
                         final AMQPSession<?, ?> session = sessionPrincipal.getSession();
-                        _blockedSessions.add(session);
                         session.block(_queue);
+                        _blockedSessions.add(session);
                     }
                 }
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org