From d76bf6a81134877cf4c5f92832290963f25f90be Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Fri, 17 May 2024 11:38:43 +0800 Subject: [PATCH] fix --- library/httpserver/httpserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/httpserver/httpserver.go b/library/httpserver/httpserver.go index 8d33a2ac..90be0c2b 100644 --- a/library/httpserver/httpserver.go +++ b/library/httpserver/httpserver.go @@ -22,7 +22,6 @@ const ( func StartHttpServer(srv *http.Server, cfg *configcenter.DefaultConfig, ip string, port int) { quit := make(chan os.Signal) - signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM) go func() { if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed { @@ -43,6 +42,7 @@ func StartHttpServer(srv *http.Server, cfg *configcenter.DefaultConfig, ip strin setServerStatusFD(ServerStatusFDRun) }() + signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM) <-quit logger.Info("Shutdown Server ...")