cmd/revid-cli: not expecting error from revid.Stop() in revid-cli anymore:

This commit is contained in:
Saxon 2019-03-02 13:30:46 +10:30
parent c3f846379d
commit 3c273adf4c
1 changed files with 2 additions and 7 deletions

View File

@ -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: