diff --git a/cmd/revid-cli/main.go b/cmd/revid-cli/main.go index 4c991897..bc318694 100644 --- a/cmd/revid-cli/main.go +++ b/cmd/revid-cli/main.go @@ -343,21 +343,28 @@ func startRevid(ns *netsender.Sender, cfg revid.Config) (*revid.Revid, revid.Con if err != nil { return nil, cfg, err } - rv.Start() - return rv, cfg, nil + err = rv.Start() + return rv, cfg, err } -func stopRevid(rv *revid.Revid) { - rv.Stop() +func stopRevid(rv *revid.Revid) error { + err := rv.Stop() + if err != nil { + return err + } // FIXME(kortschak): Is this waiting on completion of work? // Use a wait group and Wait method if it is. time.Sleep(revidStopTime) + return nil } func updateRevid(ns *netsender.Sender, rv *revid.Revid, cfg revid.Config, vars map[string]string, stop bool) (*revid.Revid, revid.Config, error) { if stop { - stopRevid(rv) + err := stopRevid(rv) + if err != nil { + return nil, cfg, err + } } //look through the vars and update revid where needed