diff --git a/revid/revid.go b/revid/revid.go index edbfc3d0..ee6bc992 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -202,10 +202,7 @@ func (r *Revid) handleErrors() { err := <-r.err if err != nil { r.config.Logger.Log(logger.Error, pkg+"async error", "error", err.Error()) - err = r.Stop() - if err != nil { - r.config.Logger.Log(logger.Error, pkg+"failed to stop in response to error", "error", err.Error()) - } + r.Stop() err = r.Start() if err != nil { r.config.Logger.Log(logger.Error, pkg+"failed to restart in response to error", "error", err.Error()) @@ -342,7 +339,8 @@ func (r *Revid) setIsRunning(b bool) { // and packetising (if theres packetization) to a defined output. func (r *Revid) Start() error { if r.IsRunning() { - return errors.New(pkg + "start called but revid is already running") + r.config.Logger.Log(logger.Warning, pkg+"start called, but revid already running") + return nil } r.config.Logger.Log(logger.Info, pkg+"starting Revid") // TODO: this doesn't need to be here @@ -376,9 +374,7 @@ func (r *Revid) Stop() { func (r *Revid) Update(vars map[string]string) error { if r.IsRunning() { - if err := r.Stop(); err != nil { - return err - } + r.Stop() } //look through the vars and update revid where needed for key, value := range vars {