MCPcopy
hub / github.com/google/ax / GracefulStop

Method GracefulStop

internal/server/server.go:151–159  ·  view source on GitHub ↗

GracefulStop stops the gRPC server gracefully.

()

Source from the content-addressed store, hash-verified

149
150// GracefulStop stops the gRPC server gracefully.
151func (s *Server) GracefulStop() {
152 slog.Info("Stopping server gracefully...")
153 if s.controller != nil {
154 s.controller.Close()
155 }
156 if s.grpcServer != nil {
157 s.grpcServer.GracefulStop()
158 }
159}
160
161func (s *Server) markInFlight(id string) (exists bool, cleanup func()) {
162 s.inFlightMu.Lock()

Callers 1

runServeFunction · 0.80

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected