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

master
Zhang.Y 2 years ago committed by GitHub
parent 76086fc717
commit 7da77302f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save