mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-06-03 06:01:30 +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 {
|
if err != nil {
|
||||||
return utils.Wrap1(err)
|
return utils.Wrap1(err)
|
||||||
}
|
}
|
||||||
if config.Config.Prometheus.Enable && prometheusPort != 0 {
|
go func() {
|
||||||
err := prome.StartPrometheusSrv(prometheusPort)
|
if config.Config.Prometheus.Enable && prometheusPort != 0 {
|
||||||
if err != nil {
|
if err := prome.StartPrometheusSrv(prometheusPort); err != nil {
|
||||||
return err
|
panic(err.Error())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}()
|
||||||
|
err = srv.Serve(listener)
|
||||||
|
if err != nil {
|
||||||
|
return utils.Wrap1(err)
|
||||||
}
|
}
|
||||||
return rpcFn(zkClient, srv)
|
return rpcFn(zkClient, srv)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user