From a2b241332bc6718df20b7c2714dbece1c7205f6e Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 26 Sep 2022 01:54:29 +0200 Subject: [PATCH] packages/hyprspace: trigger discovery again on failed connection --- packages/networking/hyprspace/cli/up.go | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/networking/hyprspace/cli/up.go b/packages/networking/hyprspace/cli/up.go index 67c90f1..bc22e7d 100644 --- a/packages/networking/hyprspace/cli/up.go +++ b/packages/networking/hyprspace/cli/up.go @@ -220,6 +220,7 @@ func UpRun(r *cmd.Root, c *cmd.Sub) { stream, err = host.NewStream(ctx, peer, p2p.Protocol) if err != nil { fmt.Println("[!] Failed to dial peer: " + peer.Pretty()) + go p2p.Discover(ctx, host, dht, peerTable) continue } stream.SetWriteDeadline(time.Now().Add(25 * time.Second))