mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-06-01 12:39:18 +08:00
script
This commit is contained in:
parent
a957f2227b
commit
946fba17ef
@ -52,11 +52,16 @@ func Start(rpcPort int, rpcRegisterName string, prometheusPort int, rpcFn func(c
|
||||
if err != nil {
|
||||
return utils.Wrap1(err)
|
||||
}
|
||||
if config.Config.Prometheus.Enable && prometheusPort != 0 {
|
||||
err := prome.StartPrometheusSrv(prometheusPort)
|
||||
if err != nil {
|
||||
return err
|
||||
go func() {
|
||||
if config.Config.Prometheus.Enable && prometheusPort != 0 {
|
||||
if err := prome.StartPrometheusSrv(prometheusPort); err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
}
|
||||
}()
|
||||
err = srv.Serve(listener)
|
||||
if err != nil {
|
||||
return utils.Wrap1(err)
|
||||
}
|
||||
return rpcFn(zkClient, srv)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user