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:
parent
9a20a5354d
commit
21ea4f905f
8
godns.go
8
godns.go
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user