device/webcam/webcam.go: fixed error output

This commit is contained in:
Ella Pietraroia 2019-12-23 15:37:20 +10:30
parent d0102779ed
commit 0da4c3b618
1 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ func (w *Webcam) Start() error {
for { for {
select { select {
case <-w.done: case <-w.done:
w.cfg.Logger.Log(logger.Info, "raspivid.Stop() called, finished checking stderr") w.cfg.Logger.Log(logger.Info, "webcam.Stop() called, finished checking stderr")
return return
default: default:
buf, err := ioutil.ReadAll(stderr) buf, err := ioutil.ReadAll(stderr)
@ -175,7 +175,7 @@ func (w *Webcam) Start() error {
} }
if len(buf) != 0 { if len(buf) != 0 {
w.cfg.Logger.Log(logger.Error, "error from raspivid stderr", "error", string(buf)) w.cfg.Logger.Log(logger.Error, "error from webcam stderr", "error", string(buf))
return return
} }
} }