Skip to content

Commit

Permalink
node: fix lint issue in rpcstack.go (ethereum#25774)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl authored and blakehhuynh committed Oct 3, 2022
1 parent c3dc7df commit 4411196
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/rpcstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,15 @@ 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)
if err != nil && err == ctx.Err() {
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())

Expand Down

0 comments on commit 4411196

Please sign in to comment.