mirror of https://bitbucket.org/ausocean/av.git
defunct process fix
This commit is contained in:
parent
5b5d17ee87
commit
3f49f56ec5
|
@ -632,18 +632,7 @@ func (r *revid) setupInputForRaspivid() error {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
stdout, _ := r.cmd.StdoutPipe()
|
stdout, _ := r.cmd.StdoutPipe()
|
||||||
err := r.cmd.Start()
|
go r.cmd.Run()
|
||||||
if err != nil {
|
|
||||||
for i := 0; i < raspividNoOfTries; i++ {
|
|
||||||
r.Log(Error, err.Error())
|
|
||||||
err = r.cmd.Start()
|
|
||||||
if err == nil {
|
|
||||||
goto raspividSuccess
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
raspividSuccess:
|
|
||||||
r.inputReader = bufio.NewReader(stdout)
|
r.inputReader = bufio.NewReader(stdout)
|
||||||
go r.readCamera()
|
go r.readCamera()
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue