[BugFix: Fix exit deadlock
@@ -263,7 +263,7 @@ public class ManagementNodeManagerImpl extends AbstractService implements Manage
return;
}
- stop();
+ stop(true);
}));
}
@@ -913,9 +913,8 @@ public class ManagementNodeManagerImpl extends AbstractService implements Manage
logger.debug(String.format("started heartbeat thread for management node[uuid:%s]", Platform.getManagementServerId()));
}
- @Override
@Deferred
- public synchronized boolean stop() {
+ public boolean stop(boolean skipExit) {
Platform.IS_RUNNING = false;
if (stopped) {
@@ -935,6 +934,10 @@ public class ManagementNodeManagerImpl extends AbstractService implements Manage
}
}.run();
+ if (skipExit) {
+ return;
+ }
+
System.exit(0);
}
});
@@ -1014,6 +1017,11 @@ public class ManagementNodeManagerImpl extends AbstractService implements Manage
return true;
}
+ @Override
+ public boolean stop() {
+ return stop(false);
+ }
+
@AsyncThread
private void startInThread() {
try {
