diff --git a/cmd/revid-cli/main.go b/cmd/revid-cli/main.go index 064be699..056687de 100644 --- a/cmd/revid-cli/main.go +++ b/cmd/revid-cli/main.go @@ -96,9 +96,7 @@ func main() { cfg.Logger.Log(logger.Fatal, pkg+"failed to start revid", "error", err.Error()) } time.Sleep(*runDurationPtr) - if err = rv.Stop(); err != nil { - cfg.Logger.Log(logger.Error, pkg+"failed to stop revid before program termination", "error", err.Error()) - } + rv.Stop() return } @@ -360,10 +358,7 @@ func run(cfg revid.Config) error { } time.Sleep(time.Duration(rv.Config().BurstPeriod) * time.Second) log.Log(logger.Info, pkg+"Stopping burst...") - err = rv.Stop() - if err != nil { - return err - } + rv.Stop() ns.SetMode(paused, &vs) } sleep: