Skip to content

Commit

Permalink
fix start rpcServer NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
JackyYangPassion committed Jul 6, 2022
1 parent 70cf9d0 commit 64dc9b4
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ private void startRpcServer() {
private com.alipay.remoting.rpc.RpcServer remotingRpcServer() {
ServerConfig serverConfig = Whitebox.getInternalState(this.rpcServer,
"serverConfig");
serverConfig.buildIfAbsent();
return Whitebox.getInternalState(serverConfig.getServer(),
"remotingServer");
}
Expand Down Expand Up @@ -378,11 +379,13 @@ private void loadGraph(String name, String graphConfPath) {
}

private void waitGraphsReady() {
com.alipay.remoting.rpc.RpcServer remotingRpcServer =
this.remotingRpcServer();
for (String graphName : this.graphs.keySet()) {
HugeGraph graph = this.graph(graphName);
graph.waitReady(remotingRpcServer);
if (!this.rpcServer.enabled()) {
com.alipay.remoting.rpc.RpcServer remotingRpcServer =
this.remotingRpcServer();
for (String graphName : this.graphs.keySet()) {
HugeGraph graph = this.graph(graphName);
graph.waitReady(remotingRpcServer);
}
}
}

Expand Down

0 comments on commit 64dc9b4

Please sign in to comment.