You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ra...@apache.org on 2008/06/05 20:11:46 UTC
svn commit: r663691 -
/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Author: rajdavies
Date: Thu Jun 5 11:11:46 2008
New Revision: 663691
URL: http://svn.apache.org/viewvc?rev=663691&view=rev
Log:
Further change for https://issues.apache.org/activemq/browse/AMQ-1771
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java?rev=663691&r1=663690&r2=663691&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java Thu Jun 5 11:11:46 2008
@@ -694,7 +694,7 @@
try {
//if it isn't set after 2secs - it
//probably never will be
- listenerMutex.wait(2000);
+ listenerMutex.wait(2000);
}catch(InterruptedException ex) {}
}
}
@@ -725,11 +725,12 @@
// Make sure on initial startup, that the transportListener has been initialized
// for this instance.
- while(transportListener == null) {
- try {
- Thread.sleep(100);
+ synchronized(listenerMutex) {
+ if (transportListener==null) {
+ try {
+ listenerMutex.wait(2000);
+ }catch(InterruptedException ex) {}
}
- catch(InterruptedException iEx) {}
}