From 399ecb88746f84955f03c3afe67d08a8a7e18f58 Mon Sep 17 00:00:00 2001 From: Saxon Date: Fri, 17 Jan 2020 16:23:28 +1030 Subject: [PATCH] revid: do more thinking about errors in processFrom --- revid/revid.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/revid/revid.go b/revid/revid.go index a05c9650..03f9bd05 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -847,7 +847,12 @@ func (r *Revid) Update(vars map[string]string) error { // processFrom is run as a routine to read from a input data source, lex and // then send individual access units to revid's encoders. func (r *Revid) processFrom(read io.Reader, delay time.Duration) { - r.err <- r.lexTo(r.filters[0], read, delay) - r.cfg.Logger.Log(logger.Info, pkg+"finished lexing") + err := r.lexTo(r.filters[0], read, delay) + switch { + case err == nil: // Do nothing. + case errors.Is(err, io.EOF): // TODO: handle this depending on loop mode. + default: + r.err <- err + } r.wg.Done() }