node: fix lint issue in rpcstack.go (#25774)

This commit is contained in:
Felix Lange 2022-09-15 15:21:44 +02:00 committed by GitHub
parent 0ee8b273f2
commit 3db4a13230
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -267,7 +267,7 @@ func (h *httpServer) doStop() {
h.wsHandler.Store((*rpcHandler)(nil)) h.wsHandler.Store((*rpcHandler)(nil))
wsHandler.server.Stop() wsHandler.server.Stop()
} }
ctx, cancel := context.WithTimeout(context.Background(), shutdownTimeout) ctx, cancel := context.WithTimeout(context.Background(), shutdownTimeout)
defer cancel() defer cancel()
err := h.server.Shutdown(ctx) err := h.server.Shutdown(ctx)
@ -275,7 +275,7 @@ func (h *httpServer) doStop() {
h.log.Warn("HTTP server graceful shutdown timed out") h.log.Warn("HTTP server graceful shutdown timed out")
h.server.Close() h.server.Close()
} }
h.listener.Close() h.listener.Close()
h.log.Info("HTTP server stopped", "endpoint", h.listener.Addr()) h.log.Info("HTTP server stopped", "endpoint", h.listener.Addr())