Author: clebert.suconic(a)jboss.com
Date: 2011-12-19 09:51:20 -0500 (Mon, 19 Dec 2011)
New Revision: 11913
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
Log:
https://issues.jboss.org/browse/JBPAPP-7785 - protecting factories usage - simple fix
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-12-19
14:33:24 UTC (rev 11912)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-12-19
14:51:20 UTC (rev 11913)
@@ -689,7 +689,10 @@
private void removeFromConnecting(ClientSessionFactoryInternal factory)
{
- connectingFactories.remove(factory);
+ synchronized (connectingFactories)
+ {
+ connectingFactories.remove(factory);
+ }
}
private void addToConnecting(ClientSessionFactoryInternal factory)