aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.go b/main.go
index fd775d8..38fbe3c 100644
--- a/main.go
+++ b/main.go
@@ -49,7 +49,7 @@ func fetchKeys(username string) string {
// Need to fix this to not be an infinite loop
func checkResolvers() {
- i := 0
+ i := 1
for i < 3 {
_, err := net.LookupIP("github.com")
if err != nil {
@@ -60,6 +60,9 @@ func checkResolvers() {
break
}
}
+ if i == 3 {
+ log.Fatalln("Could not reliably lookup host github.com")
+ }
return
}