From 3a498e80ff0c4cb23bc99995ae0396d07bd2231c Mon Sep 17 00:00:00 2001 From: Amos Law Date: Mon, 5 Oct 2020 07:30:46 -0400 Subject: [PATCH] Registry: Fix service shutdown mode trigger location (#28025) --- pkg/server/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/server/server.go b/pkg/server/server.go index bc6f23203aa..feeaabc961b 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -179,10 +179,10 @@ func (s *Server) Run() (err error) { } err := service.Run(s.context) - // Mark that we are in shutdown mode - // So no more services are started - s.shutdownInProgress = true if err != nil { + // Mark that we are in shutdown mode + // So no more services are started + s.shutdownInProgress = true if err != context.Canceled { // Server has crashed. s.log.Error("Stopped "+descriptor.Name, "reason", err)