Explorar o código

fix: `\u003cnil\u003e` log output when http server shutdown. (#2055)

Zhang.Y %!s(int64=2) %!d(string=hai) anos
pai
achega
7da77302f4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      rest/internal/starter.go

+ 1 - 1
rest/internal/starter.go

@@ -39,7 +39,7 @@ func start(host string, port int, handler http.Handler, run func(svr *http.Serve
 	}
 
 	waitForCalled := proc.AddWrapUpListener(func() {
-		if e := server.Shutdown(context.Background()); err != nil {
+		if e := server.Shutdown(context.Background()); e != nil {
 			logx.Error(e)
 		}
 	})