mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
fix: return the SIGTERM received,shutting down
This commit is contained in:
parent
455ac082ef
commit
3d9700be29
@ -85,7 +85,7 @@ func run(port int, proPort int) error {
|
||||
go func() {
|
||||
p := ginprom.NewPrometheus("app", prommetrics.GetGinCusMetrics("Api"))
|
||||
p.SetListenAddress(fmt.Sprintf(":%d", proPort))
|
||||
if err := p.Use(router); err != nil && err != http.ErrServerClosed {
|
||||
if err = p.Use(router); err != nil && err != http.ErrServerClosed {
|
||||
netErr = errs.Wrap(err, fmt.Sprintf("prometheus start err: %d", proPort))
|
||||
netDone <- struct{}{}
|
||||
}
|
||||
|
||||
@ -149,6 +149,7 @@ func Start(
|
||||
if err != nil {
|
||||
return errs.Wrap(err, "shutdown err")
|
||||
}
|
||||
return errors.New("SIGTERM received, shutting down")
|
||||
case <-netDone:
|
||||
close(netDone)
|
||||
return netErr
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user