Waits 300ms before first DNS resolution try

This commit is contained in:
Quentin McGaw
2020-04-19 20:44:33 +00:00
parent f1569dac05
commit 88c9d3d687

View File

@@ -8,6 +8,7 @@ import (
func (c *configurator) WaitForUnbound() (err error) { func (c *configurator) WaitForUnbound() (err error) {
const maxTries = 10 const maxTries = 10
const hostToResolve = "github.com" const hostToResolve = "github.com"
time.Sleep(300 * time.Millisecond)
for try := 1; try <= maxTries; try++ { for try := 1; try <= maxTries; try++ {
_, err := c.lookupIP(hostToResolve) _, err := c.lookupIP(hostToResolve)
if err == nil { if err == nil {