1
0
mirror of https://github.com/taigrr/godns synced 2025-01-18 04:03:25 -08:00

add the infinite loop

This commit is contained in:
Timothy 2014-05-13 23:24:19 +08:00
parent 9a20a5354d
commit 21ea4f905f

View File

@ -28,8 +28,8 @@ func main() {
}
func dns_loop(loop chan bool) {
fmt.Println("Inside the loop...")
time.Sleep(time.Second * 2)
for {
domain_id := get_domain(Configuration.Domain)
@ -48,5 +48,7 @@ func dns_loop(loop chan bool) {
fmt.Println("Current IP is same as domain IP, no need to update...")
}
loop <- false
//Interval is 5 minutes
time.Sleep(time.Second * 60 * 5)
}
}