mirror of https://bitbucket.org/ausocean/av.git
Load broadcast state on startup
This commit is contained in:
parent
b68da55793
commit
f9cfbda44f
|
@ -375,6 +375,14 @@ func main() {
|
|||
if err != nil {
|
||||
log.Fatal("could not create new broadcast manager", "error", err)
|
||||
}
|
||||
|
||||
// Try to load any previous state. There may be a previous state if the
|
||||
// watchdog did a process restart.
|
||||
err = m.load()
|
||||
if err != nil {
|
||||
log.Warning("could not load previous state", "error", err)
|
||||
}
|
||||
|
||||
http.HandleFunc("/recv", m.recv)
|
||||
http.HandleFunc("/control", m.control)
|
||||
|
||||
|
|
Loading…
Reference in New Issue