Registry: Fix service shutdown mode trigger location (#28025)

This commit is contained in:
Amos Law 2020-10-05 07:30:46 -04:00 committed by GitHub
parent 531c579341
commit 3a498e80ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,10 +179,10 @@ func (s *Server) Run() (err error) {
}
err := service.Run(s.context)
if err != nil {
// Mark that we are in shutdown mode
// So no more services are started
s.shutdownInProgress = true
if err != nil {
if err != context.Canceled {
// Server has crashed.
s.log.Error("Stopped "+descriptor.Name, "reason", err)