From 6a0c9941ea3bae800e9c90fac1fde116cd43c430 Mon Sep 17 00:00:00 2001 From: Saxon Milton Date: Fri, 28 Sep 2018 04:23:43 +0000 Subject: [PATCH] revid: capturing any errors from r.lexTo --- revid/revid.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/revid/revid.go b/revid/revid.go index 968d01ff..bac1262a 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -473,7 +473,10 @@ func (r *Revid) startRaspivid() error { r.inputReader = stdout r.config.Logger.Log(smartlogger.Info, pkg+"reading camera data") - r.lexTo(r.encoder, r.inputReader, delay) + err = r.lexTo(r.encoder, r.inputReader, delay) + if err != nil { + return err + } r.config.Logger.Log(smartlogger.Info, pkg+"not trying to read from camera anymore") return nil }