We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e06254 commit 1820bb3Copy full SHA for 1820bb3
cmd/serve.go
@@ -212,6 +212,14 @@ func isAddressReachable(addr string) (bool, error) {
212
pinger.Timeout = 2 * time.Second
213
pinger.Count = 1
214
215
+ // We resolve first because a host that's currently off may not have a dns entry and we don't want to spam the log.
216
+ // We could display this in the web interface in the future instead of ignoring it.
217
+ pinger.ResolveTimeout = 2 * time.Second
218
+ err = pinger.Resolve()
219
+ if err != nil {
220
+ return false, nil
221
+ }
222
+
223
err = pinger.Run()
224
if err != nil {
225
return false, fmt.Errorf("error pinging: %v", err)
0 commit comments