Skip to content

Commit

Permalink
Extend debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis-tra committed Mar 14, 2021
1 parent e572ea3 commit 83ae2bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/receive/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,13 @@ func (n *Node) HandlePeer(pi peer.AddrInfo) {
// TODO: Check if the multi addresses have changed
_, loaded := n.discoveredPeers.LoadOrStore(pi.ID, pi)
if loaded {
log.Debugln("Skipping peer as we tried to connect previously:", pi.ID)
return
}

log.Debugln("Connecting to peer:", pi.ID)
if err := n.Connect(n.ServiceContext(), pi); err != nil {
// stale entry in DHT?
// log.Debugln(err)
log.Debugln("Error connecting to peer:", pi.ID, err)
return
}

Expand Down

0 comments on commit 83ae2bd

Please sign in to comment.