packages/hyprspace: improve logging
This commit is contained in:
parent
8c2b6341c0
commit
cbe51dd88c
2 changed files with 3 additions and 4 deletions
|
@ -216,10 +216,9 @@ func UpRun(r *cmd.Root, c *cmd.Sub) {
|
|||
// Check if the destination of the packet is a known peer to
|
||||
// the interface.
|
||||
if peer, ok := peerTable[dst]; ok {
|
||||
fmt.Println("[-] Connecting to peer: " + peer.Pretty())
|
||||
stream, err = host.NewStream(ctx, peer, p2p.Protocol)
|
||||
if err != nil {
|
||||
fmt.Println("[!] Failed to dial peer: " + peer.Pretty())
|
||||
fmt.Println("[!] Failed to open stream to " + dst)
|
||||
go p2p.Rediscover(discoverNow)
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -32,11 +32,11 @@ func Discover(ctx context.Context, h host.Host, dht *dht.IpfsDHT, peerTable map[
|
|||
if err != nil {
|
||||
continue
|
||||
}
|
||||
_, err = h.Network().DialPeer(ctx, addrs.ID)
|
||||
conn, err := h.Network().DialPeer(ctx, addrs.ID)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
fmt.Println("[+] Connected to " + nd)
|
||||
fmt.Printf("[+] Connected to %s at %s\n", nd, conn.RemoteMultiaddr())
|
||||
}
|
||||
}
|
||||
dur = dur * 2
|
||||
|
|
Loading…
Reference in a new issue