From fdd698dadea7061c119ebf612972546ebd630fab Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 9 Mar 2018 17:04:30 -0500 Subject: [PATCH] resources: svc: Add deactivating state There seems to be a "deactivating" state that some services can reach. Add this case, and switch the panic to an error. --- resources/svc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/svc.go b/resources/svc.go index 343742be..4429ab24 100644 --- a/resources/svc.go +++ b/resources/svc.go @@ -182,8 +182,10 @@ func (obj *SvcRes) Watch() error { log.Printf("Svc[%s]->Reloading", svc) case "failed": log.Printf("Svc[%s]->Failed", svc) + case "deactivating": + log.Printf("Svc[%s]->Deactivating", svc) default: - log.Fatalf("Unknown svc state: %s", event[svc].ActiveState) + return fmt.Errorf("Unknown svc state: %s", event[svc].ActiveState) } } else { // svc stopped (and ActiveState is nil...)