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
This commit is contained in:
James Strachan 2006-05-02 12:29:28 +00:00
parent 045353cde6
commit b06de590e0
1 changed files with 1 additions and 1 deletions

View File

@ -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;