diff --git a/cmd/revid-cli/main.go b/cmd/revid-cli/main.go index b33ef124..29191d3a 100644 --- a/cmd/revid-cli/main.go +++ b/cmd/revid-cli/main.go @@ -286,6 +286,7 @@ func run(cfg revid.Config) error { } for { + // TODO(saxon): replace this call with call to ns.Run(). if err := send(&ns, rv); err != nil { log.Log(logger.Error, pkg+"Run Failed. Retrying...", "error", err.Error()) time.Sleep(netSendRetryTime) diff --git a/revid/revid.go b/revid/revid.go index d0f3abf6..a3c10b66 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -1,6 +1,6 @@ /* NAME - r.go + revid.go DESCRIPTION See Readme.md @@ -329,9 +329,9 @@ func (r *Revid) IsRunning() bool { func (r *Revid) Config() Config { r.mu.Lock() - ret := r.config + cfg := r.config r.mu.Unlock() - return ret + return cfg } // setIsRunning sets r.isRunning using b. @@ -379,7 +379,9 @@ func (r *Revid) Stop() error { func (r *Revid) Update(vars map[string]string) error { if r.IsRunning() { - r.Stop() + if err := r.Stop(); err != nil { + return err + } } //look through the vars and update revid where needed for key, value := range vars {