From b06de590e0b63d3a20fd71f386e27c2cfd49d055 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Tue, 2 May 2006 12:29:28 +0000 Subject: [PATCH] ensure that the check of whether or not the ConnectionInfo is sent to the broker - and the clientID created - is thread safe to fix AMQ-696 git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@398928 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/activemq/ActiveMQConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java index 334869ef3f..7cccfcfd56 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java @@ -1207,7 +1207,7 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon * * @throws JMSException */ - protected void ensureConnectionInfoSent() throws JMSException { + protected synchronized void ensureConnectionInfoSent() throws JMSException { // Can we skip sending the ConnectionInfo packet?? if (isConnectionInfoSentToBroker || closed.get()) { return;