diff --git a/server/server.go b/server/server.go index 3064136a..39658b5d 100644 --- a/server/server.go +++ b/server/server.go @@ -186,7 +186,6 @@ func (s *Server) Run() { // for HTTP over gRPC, ensure we don't double-count the middleware httpgrpc.RegisterHTTPServer(s.GRPC, httpgrpc_server.NewServer(s.HTTP)) go s.GRPC.Serve(s.grpcListener) - defer s.GRPC.GracefulStop() // Wait for a signal s.handler.Loop() @@ -203,5 +202,5 @@ func (s *Server) Shutdown() { defer cancel() // releases resources if httpServer.Shutdown completes before timeout elapses s.httpServer.Shutdown(ctx) - s.GRPC.Stop() + s.GRPC.GracefulStop() }