mirror of https://bitbucket.org/ausocean/av.git
using const for camera retry period
This commit is contained in:
parent
fa7437cbd7
commit
80b2672a08
|
@ -70,6 +70,7 @@ const (
|
||||||
ffmpegPath = "/usr/local/bin/ffmpeg"
|
ffmpegPath = "/usr/local/bin/ffmpeg"
|
||||||
rtmpConnectionTimout = 10
|
rtmpConnectionTimout = 10
|
||||||
outputChanSize = 10000
|
outputChanSize = 10000
|
||||||
|
cameraRetryPeriod = 5 * time.Second
|
||||||
)
|
)
|
||||||
|
|
||||||
// Log Types
|
// Log Types
|
||||||
|
@ -565,7 +566,7 @@ func (r *revid) readCamera() {
|
||||||
// We know this means we're getting nothing from the cam
|
// We know this means we're getting nothing from the cam
|
||||||
case err != nil && err.Error() == "EOF" && r.isRunning:
|
case err != nil && err.Error() == "EOF" && r.isRunning:
|
||||||
r.Log(Error, "No data from camera!")
|
r.Log(Error, "No data from camera!")
|
||||||
time.Sleep(5 * time.Second)
|
time.Sleep(cameraRetryPeriod)
|
||||||
// We don't know what this one is, so let's just output the error to the log
|
// We don't know what this one is, so let's just output the error to the log
|
||||||
case err != nil && r.isRunning:
|
case err != nil && r.isRunning:
|
||||||
r.Log(Error, err.Error())
|
r.Log(Error, err.Error())
|
||||||
|
|
Loading…
Reference in New Issue