mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 08:43:02 +08:00
fix(agent): run system exit after agent launch failed
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user