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 2018/02/19 23:21:45 UTC
[02/10] qpid-broker-j git commit: QPID-8091: [Broker-J] [AMQP 0-10]
Invoke 0-10 session on close operations only once
QPID-8091: [Broker-J] [AMQP 0-10] Invoke 0-10 session on close operations only once
(cherry picked from commit 46c49cf206d776af883610352381219a8431ffb4)
Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/5b8587a0
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/5b8587a0
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/5b8587a0
Branch: refs/heads/7.0.x
Commit: 5b8587a021c58c233b631d161a80e291dff441bf
Parents: 24df0ac
Author: Alex Rudyy <or...@apache.org>
Authored: Wed Feb 7 23:47:17 2018 +0000
Committer: Alex Rudyy <or...@apache.org>
Committed: Mon Feb 19 17:51:43 2018 +0000
----------------------------------------------------------------------
.../server/protocol/v0_10/ServerSessionDelegate.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/5b8587a0/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java b/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
index 1ef431c..4e6e97f 100644
--- a/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
+++ b/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
@@ -30,6 +30,7 @@ import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
import com.google.common.util.concurrent.Futures;
import org.slf4j.Logger;
@@ -91,6 +92,7 @@ import org.apache.qpid.server.virtualhost.VirtualHostUnavailableException;
public class ServerSessionDelegate extends MethodDelegate<ServerSession> implements ProtocolDelegate<ServerSession>
{
private static final Logger LOGGER = LoggerFactory.getLogger(ServerSessionDelegate.class);
+ private final AtomicBoolean _closed = new AtomicBoolean();
public ServerSessionDelegate()
{
@@ -1803,10 +1805,12 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
public void closed(ServerSession session)
{
-
- session.stopSubscriptions();
- session.onClose();
- session.unregisterSubscriptions();
+ if (_closed.compareAndSet(false, true))
+ {
+ session.stopSubscriptions();
+ session.onClose();
+ session.unregisterSubscriptions();
+ }
}
public void detached(ServerSession session)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org