GracefulStop stops the gRPC server gracefully.
()
| 149 | |
| 150 | // GracefulStop stops the gRPC server gracefully. |
| 151 | func (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 | |
| 161 | func (s *Server) markInFlight(id string) (exists bool, cleanup func()) { |
| 162 | s.inFlightMu.Lock() |