tDon't panic when directory fetch fails. - tordam - A library for peer discovery inside the Tor network HTML git clone https://git.parazyd.org/tordam DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit b2c4cc3445dc9e3105dc240031a8c2c060e9cf70 DIR parent 30f6e47298d0cc3bcd4c234830f6ae5a83e764e1 HTML Author: parazyd <parazyd@dyne.org> Date: Mon, 12 Feb 2018 10:50:43 +0100 Don't panic when directory fetch fails. Diffstat: M cmd/dam-client/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- DIR diff --git a/cmd/dam-client/main.go b/cmd/dam-client/main.go t@@ -244,7 +244,12 @@ func main() { var ann = 0 // Track of how many successful authentications var wg sync.WaitGroup dirlist, err := fetchDirlist(dirHosts) - lib.CheckError(err) + if err != nil { + // No route to host, or failed dl. Try later. + log.Println("Failed to fetch directory list. Retrying in a minute.") + time.Sleep(60 * time.Second) + continue + } for _, i := range dirlist { wg.Add(1) go func(x string) {