From 706b0d94e1f6374661e3619991db09b8b24c0953 Mon Sep 17 00:00:00 2001 From: luhaoling <2198702716@qq.com> Date: Thu, 22 Feb 2024 21:54:18 +0800 Subject: [PATCH] fix: fix the error --- internal/msggateway/init.go | 4 +--- pkg/common/startrpc/start.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/msggateway/init.go b/internal/msggateway/init.go index 321407f7e..b18efcd50 100644 --- a/internal/msggateway/init.go +++ b/internal/msggateway/init.go @@ -46,9 +46,7 @@ func RunWsAndServer(rpcPort, wsPort, prometheusPort int) error { netDone := make(chan error) go func() { err = hubServer.Start() - if err != nil { - netDone <- err - } + netDone <- err }() return hubServer.LongConnServer.Run(netDone) } diff --git a/pkg/common/startrpc/start.go b/pkg/common/startrpc/start.go index c5105ec51..6bcdcca5d 100644 --- a/pkg/common/startrpc/start.go +++ b/pkg/common/startrpc/start.go @@ -152,7 +152,7 @@ func Start( if err != nil { return errs.Wrap(err, "shutdown err") } - return errors.New("SIGTERM EXIT") + return nil case <-netDone: close(netDone) return netErr