From 386c28cfa31358c76c8c645aaacb844a00a7cf13 Mon Sep 17 00:00:00 2001 From: Ryan Bourgeois Date: Mon, 2 Dec 2013 13:25:14 -0800 Subject: [PATCH] Handle Backoff during shutdown. --- service/service.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/service.go b/service/service.go index 014705c..c10dda4 100644 --- a/service/service.go +++ b/service/service.go @@ -225,7 +225,10 @@ func (s *Service) Run(commands <-chan Command, events chan<- Event) { if lastCmd != nil { lastCmd.respond(s, errors.New("service is shutting down")) } - if s.state == Stopped || s.state == Exited { + if s.state == Stopped || s.state == Exited || s.state == Backoff { + if s.state == Backoff { + s.state = Exited + } quit <- true } else if s.state == Running { stop(cmd)