Skip to content

Commit 001bb15

Browse files
committed
run_once optimization
1 parent 0ae2936 commit 001bb15

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/handler/handler.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ func (handler *Handler) DomainLoop(domain *settings.Domain, panicChan chan<- set
4141

4242
for while := true; while; while = !runOnce {
4343
handler.domainLoop(domain)
44+
45+
if runOnce {
46+
break
47+
}
48+
4449
log.Debugf("DNS update loop finished, will run again in %d seconds", handler.Configuration.Interval)
4550
time.Sleep(time.Second * time.Duration(handler.Configuration.Interval))
4651
}

0 commit comments

Comments
 (0)