diff --git a/node/rpcstack.go b/node/rpcstack.go index f45435bab22d..8244c892ff50 100644 --- a/node/rpcstack.go +++ b/node/rpcstack.go @@ -267,7 +267,7 @@ func (h *httpServer) doStop() { h.wsHandler.Store((*rpcHandler)(nil)) wsHandler.server.Stop() } - + ctx, cancel := context.WithTimeout(context.Background(), shutdownTimeout) defer cancel() err := h.server.Shutdown(ctx) @@ -275,7 +275,7 @@ func (h *httpServer) doStop() { h.log.Warn("HTTP server graceful shutdown timed out") h.server.Close() } - + h.listener.Close() h.log.Info("HTTP server stopped", "endpoint", h.listener.Addr())