This commit is contained in:
Gordon 2023-03-10 20:33:37 +08:00
parent ef0b9a9ebe
commit b61ab1201a

View File

@ -59,11 +59,16 @@ func Start(rpcPort int, rpcRegisterName string, prometheusPort int, rpcFn func(c
}
}
}()
err = rpcFn(zkClient, srv)
if err != nil {
return utils.Wrap1(err)
}
err = srv.Serve(listener)
if err != nil {
return utils.Wrap1(err)
}
return rpcFn(zkClient, srv)
return nil
}
//func Start(rpcPort int, rpcRegisterName string, prometheusPort int, rpcFn func(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error, options ...grpc.ServerOption) error {