Filter safely closes.

This commit is contained in:
Scott 2019-12-27 16:48:28 +10:30
parent 15efc8331d
commit f74e08d70a
1 changed files with 6 additions and 3 deletions

View File

@ -484,10 +484,13 @@ func (r *Revid) Stop() {
r.cfg.Logger.Log(logger.Error, pkg+"failed to close pipeline", "error", err.Error()) r.cfg.Logger.Log(logger.Error, pkg+"failed to close pipeline", "error", err.Error())
} }
//err = r.filter.Close() for _, filter := range r.filters {
if err != nil { err = filter.Close()
r.cfg.Logger.Log(logger.Error, pkg+"failed to close pipeline", "error", err.Error()) if err != nil {
r.cfg.Logger.Log(logger.Error, pkg+"failed to close pipeline", "error", err.Error())
}
} }
r.cfg.Logger.Log(logger.Info, pkg+"closed pipeline") r.cfg.Logger.Log(logger.Info, pkg+"closed pipeline")
if r.cmd != nil && r.cmd.Process != nil { if r.cmd != nil && r.cmd.Process != nil {