Skip to content

Commit

Permalink
simplify DNS refresh call
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed May 1, 2023
1 parent a0954c3 commit c4fd068
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,10 @@ func init() {
go func() {
t := time.NewTicker(30 * time.Second)
defer t.Stop()
for {
select {
case <-t.C:
dnsCache.RefreshWithOptions(options)
}
for range t.C {
dnsCache.RefreshWithOptions(options)
}
}()

}

func logMsg(msg logMessage) error {
Expand Down

0 comments on commit c4fd068

Please sign in to comment.