mirror of https://bitbucket.org/ausocean/av.git
revid: relaxed error handling in handleErrors routine
This commit is contained in:
parent
b9bccaabdd
commit
abe9722350
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue