fix(agent): run system exit after agent launch failed

This commit is contained in:
2026-04-19 18:52:10 +08:00
parent a9e41eb4c7
commit b4d6be849b
2 changed files with 8 additions and 3 deletions

View File

@@ -6,9 +6,12 @@ import work.slhaf.partner.runtime.gateway.WebSocketGatewayRegistration;
public class Main {
public static void main(String[] args) {
Agent.newAgent(Main.class)
boolean launched = Agent.newAgent(Main.class)
.addGatewayRegistration(WebSocketGatewayRegistration.INSTANCE)
.addConfigurable(new VectorClientRegistry())
.launch();
if (!launched) {
System.exit(1);
}
}
}