handle error
This commit is contained in:
parent
7a271ea070
commit
56fd74c8f4
1 changed files with 7 additions and 3 deletions
10
main.go
10
main.go
|
@ -207,15 +207,19 @@ func main() {
|
|||
}()
|
||||
|
||||
btime, err := core.GetBootTime()
|
||||
time_passed := time.Now().Sub(btime)
|
||||
time.Sleep(core.WaitDurationAfterBoot - time_passed)
|
||||
if err != nil {
|
||||
log.Printf("Error in core.GetBootTime: %v", err)
|
||||
} else {
|
||||
time_passed := time.Now().Sub(btime)
|
||||
time.Sleep(core.WaitDurationAfterBoot - time_passed)
|
||||
}
|
||||
|
||||
go func() { // timed update
|
||||
for {
|
||||
err := routineCheck(5*time.Minute)
|
||||
if err != nil {
|
||||
log.Printf("Error in routineCheck: %v", err)
|
||||
// idea: maybe should delay here
|
||||
// idea: maybe we should delay here
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Reference in a new issue