Skip to content

Commit 0e654f4

Browse files
committed
feat(api): exit when the api service failed to start
1 parent 50b8227 commit 0e654f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

framework/src/main/java/org/tron/common/application/ApplicationImpl.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ public void shutdown() {
7979

8080
@Override
8181
public void startServices() {
82-
services.start();
82+
try {
83+
services.start();
84+
} catch (Exception e) {
85+
logger.error("Failed to start services", e);
86+
System.exit(1);
87+
}
8388
}
8489

8590
@Override

0 commit comments

Comments
 (0)