cshannon commented on code in PR #2554:
URL: https://github.com/apache/activemq/pull/2554#discussion_r3969021558


##########
activemq-console/src/main/java/org/apache/activemq/console/command/StartCommand.java:
##########
@@ -92,8 +92,11 @@ protected void runTask(List<String> brokerURIs) throws 
Exception {
                 throw e;
             }
 
-            if (!broker.waitUntilStarted()) {
-                throw new Exception(broker.getStartException());
+            while (!broker.waitUntilStarted()) {

Review Comment:
   Just like my comment on the other PR, we should probably do an 
broker.isSlave() check here. The exception should be set, but in case something 
gets broken in the future this would add an extra check just to ensure we 
always fail for a primary/active broker just like today if it returns false.
   
   Maybe:
   
   ```java
   while (!broker.waitUntilStarted()) {
       if (broker.getStartException() != null || !broker.isSlave()) {
           throw new Exception(broker.getStartException());  
       }
   }
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to