|
|
@ -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()) |
|
|
|
|
|
|
|
|
|
|
|