Skip to content

Commit

Permalink
node: fix lint issue in rpcstack.go (#25774)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Sep 15, 2022
1 parent 0ee8b27 commit 3db4a13
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 3db4a13

Please sign in to comment.