AMQP-149: count down latch before waiting for re-connect.

This commit is contained in:
Dave Syer
2011-04-18 16:04:43 +01:00
parent 70f2597930
commit 390b8d8847

View File

@@ -456,9 +456,11 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta
try {
consumer.start();
start.countDown();
} catch (FatalListenerStartupException ex) {
throw ex;
} catch (Throwable t) {
start.countDown();
handleStartupFailure(t);
throw t;
}
@@ -466,7 +468,6 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta
// Always better to stop receiving as soon as possible if
// transactional
boolean continuable = false;
start.countDown();
while (isActive() || continuable) {
try {
// Will come back false when the queue is drained