Permalink
Browse files

Place await() inside while loop with condition check.

  • Loading branch information...
1 parent 4546496 commit 87f9e685397b567790feeadebc32af61870b468d Francisco Borges committed Nov 19, 2012
@@ -25,15 +25,15 @@
import org.hornetq.api.core.HornetQBuffer;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.Interceptor;
+import org.hornetq.core.client.HornetQClientLogger;
+import org.hornetq.core.client.HornetQClientMessageBundle;
import org.hornetq.core.protocol.core.Channel;
import org.hornetq.core.protocol.core.ChannelHandler;
import org.hornetq.core.protocol.core.CommandConfirmationHandler;
import org.hornetq.core.protocol.core.CoreRemotingConnection;
import org.hornetq.core.protocol.core.Packet;
import org.hornetq.core.protocol.core.impl.wireformat.HornetQExceptionMessage;
import org.hornetq.core.protocol.core.impl.wireformat.PacketsConfirmedMessage;
-import org.hornetq.core.client.HornetQClientLogger;
-import org.hornetq.core.client.HornetQClientMessageBundle;
import org.hornetq.spi.core.protocol.RemotingConnection;
/**
@@ -307,7 +307,10 @@ public Packet sendBlocking(final Packet packet) throws HornetQException
{
if(connection.getBlockingCallFailoverTimeout() < 0)
{
- failoverCondition.await();
+ while (failingOver)
+ {
+ failoverCondition.await();
+ }
}
else
{

0 comments on commit 87f9e68

Please sign in to comment.