Commit 634b37ba authored by Matt Joiner's avatar Matt Joiner
Browse files

Add debug logging to Announce.getPeers

parent 98c5167b
......@@ -168,13 +168,13 @@ func (a *Announce) maybeAnnouncePeer(to Addr, token *string, peerId *krpc.ID) {
func (a *Announce) getPeers(addr Addr, cteh *conntrack.EntryHandle) {
// log.Printf("sending get_peers to %v", node)
m, writes, _ := a.server.getPeers(context.TODO(), addr, a.infoHash)
m, writes, err := a.server.getPeers(context.TODO(), addr, a.infoHash)
if writes == 0 {
} else {
// log.Print(err)
a.server.logger().Printf("Announce.server.getPeers result: m.Y=%v, writes=%v, err=%v", m.Y, writes, err)
// log.Printf("get_peers response error from %v: %v", node, err)
// Register suggested nodes closer to the target info-hash.
if m.R != nil && m.SenderID() != nil {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment