From f49675bfa27109867f1e18e0e49caa182eaf256f Mon Sep 17 00:00:00 2001 From: Bosanac Dejan Date: Wed, 26 Sep 2012 13:29:16 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-3887 - do safeWaitUntilStarted outside of the synchronized block as deadlocks are possible git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1390473 13f79535-47bb-0310-9956-ffa450edef68 --- .../network/DemandForwardingBridgeSupport.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java b/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java index 457711c160..94c29a58b4 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java @@ -273,14 +273,14 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br } startedLatch.countDown(); localStartedLatch.countDown(); + } - safeWaitUntilStarted(); + safeWaitUntilStarted(); - if (!disposed.get()) { - setupStaticDestinations(); - } else { - LOG.warn("Network connection between " + localBroker + " and " + remoteBroker + "(" + remoteBrokerName + ") was interrupted during establishment."); - } + if (!disposed.get()) { + setupStaticDestinations(); + } else { + LOG.warn("Network connection between " + localBroker + " and " + remoteBroker + "(" + remoteBrokerName + ") was interrupted during establishment."); } } }