mirror of https://bitbucket.org/ausocean/av.git
device/webcam/webcam.go: fixed error output
This commit is contained in:
parent
d0102779ed
commit
0da4c3b618
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue