tordam

A library for peer discovery inside the Tor network
git clone https://git.parazyd.org/tordam
Log | Files | Refs | README | LICENSE

commit b2c4cc3445dc9e3105dc240031a8c2c060e9cf70
parent 30f6e47298d0cc3bcd4c234830f6ae5a83e764e1
Author: parazyd <parazyd@dyne.org>
Date:   Mon, 12 Feb 2018 10:50:43 +0100

Don't panic when directory fetch fails.

Diffstat:
Mcmd/dam-client/main.go | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/cmd/dam-client/main.go b/cmd/dam-client/main.go @@ -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) {