From e80acded1fd5a05a12e9f97d29bd6ac9cd92d518 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sat, 12 Oct 2013 17:26:06 -0300 Subject: [PATCH] prevent asking our own tracker in dht (untested) --- libtorrent/src/kademlia/find_data.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libtorrent/src/kademlia/find_data.cpp b/libtorrent/src/kademlia/find_data.cpp index 1ef1f05b..a0609398 100644 --- a/libtorrent/src/kademlia/find_data.cpp +++ b/libtorrent/src/kademlia/find_data.cpp @@ -206,6 +206,10 @@ bool find_data::invoke(observer_ptr o) return false; } + // im not going to ask trackers from myself + if( o->id() == m_node.nid() ) + return true; + entry e; e["z"] = "q"; e["q"] = "getData"; // "getPeers"