From c9996cbae56e93899bff055a0607d68e9df56e98 Mon Sep 17 00:00:00 2001 From: Saxon Date: Sat, 2 Mar 2019 12:42:36 +1030 Subject: [PATCH] revid: stop() no longer returns error, just logs if stop is called when revid is not running. --- revid/revid.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/revid/revid.go b/revid/revid.go index 48e35a87..edbfc3d0 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -357,9 +357,10 @@ func (r *Revid) Start() error { } // Stop halts any processing of video data from a camera or file -func (r *Revid) Stop() error { +func (r *Revid) Stop() { 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") @@ -371,7 +372,6 @@ func (r *Revid) Stop() error { r.cmd.Process.Kill() } r.wg.Wait() - return nil } func (r *Revid) Update(vars map[string]string) error {