revid: relaxed error handling in handleErrors routine

This commit is contained in:
Saxon 2019-03-01 21:01:33 +10:30
parent b9bccaabdd
commit abe9722350
1 changed files with 3 additions and 3 deletions

View File

@ -204,11 +204,11 @@ func (r *Revid) handleErrors() {
r.config.Logger.Log(logger.Error, pkg+"async error", "error", err.Error())
err = r.Stop()
if err != nil {
r.config.Logger.Log(logger.Fatal, pkg+"failed to stop", "error", err.Error())
r.config.Logger.Log(logger.Error, pkg+"failed to stop in response to error", "error", err.Error())
}
err = r.Start()
if err != nil {
r.config.Logger.Log(logger.Fatal, pkg+"failed to restart", "error", err.Error())
r.config.Logger.Log(logger.Error, pkg+"failed to restart in response to error", "error", err.Error())
}
}
}
@ -359,7 +359,7 @@ func (r *Revid) Start() error {
// Stop halts any processing of video data from a camera or file
func (r *Revid) Stop() error {
if !r.IsRunning() {
return errors.New(pkg + "stop called but revid is already stopped")
return errors.New(pkg + "stop called but revid isn't running")
}
r.config.Logger.Log(logger.Info, pkg+"stopping revid")