revid: stop() no longer returns error, just logs if stop is called when revid is not running.

This commit is contained in:
Saxon 2019-03-02 12:42:36 +10:30
parent abe9722350
commit c9996cbae5
1 changed files with 3 additions and 3 deletions

View File

@ -357,9 +357,10 @@ func (r *Revid) Start() error {
} }
// Stop halts any processing of video data from a camera or file // Stop halts any processing of video data from a camera or file
func (r *Revid) Stop() error { func (r *Revid) Stop() {
if !r.IsRunning() { if !r.IsRunning() {
return errors.New(pkg + "stop called but revid isn't running") r.config.Logger.Log(logger.Warning, pkg+"stop called but revid isn't running")
return
} }
r.config.Logger.Log(logger.Info, pkg+"stopping revid") r.config.Logger.Log(logger.Info, pkg+"stopping revid")
@ -371,7 +372,6 @@ func (r *Revid) Stop() error {
r.cmd.Process.Kill() r.cmd.Process.Kill()
} }
r.wg.Wait() r.wg.Wait()
return nil
} }
func (r *Revid) Update(vars map[string]string) error { func (r *Revid) Update(vars map[string]string) error {